import ViewState from '../view-state' ; export default class View { protected viewElement : HTMLElement ; private state ? : ViewState ; constructor ( viewElement ) { this . viewElement = viewElement ; } show ( ) { this . viewElement . classList . remove ( 'hidden' ) ; } hide ( ) { this . viewElement . classList . add ( 'hidden' ) ; } getState ( ) { return this . state || new ViewState ( ) ; } setState ( state ) { this . state = state ; } }