import './view/page/login/Login.jsx';
import './view/page/account/WelcomePage.jsx';
import './view/page/account/Account.jsx';
import './view/page/account/Profile.jsx';
import './view/page/tmp/Fields.jsx';

import Header from './view/block/header/Header.jsx';
import "/global-styles/base.scss";

import { Switch } from "./view/cmp/switch/Switch";
import {Page} from "./view/page/Page";
import '/controller/MainController';

export default function() {
  let tagField, exportEl;

  let dom = <div renderTo={document.body} cls="page-content">
    <view.block.Header/>
    {Switch({cls: 'page-content__inner', key: 'navigation.current'},
      Object.keys(Page).reduce((store, pageName)=>{
        store[pageName] = new Page[pageName]();
        return store;
      }, {})
    )}
  </div>;
  const w = window;
  w.addEventListener('resize', function() {
    tmpStore.set({
      isMobile: w.innerWidth < 1025,
      width: w.innerWidth
    });
  });
  tmpStore.set('loaded', true);
};


