import { ActiveMenu, useLayoutStore } from '../store/layout';
import { Upload } from '../upload';
import { Settings } from '../settings';
import { FileApp } from '../file';
import { Statistic } from '../statistic';

export const Main = () => {
  const { activeMenu } = useLayoutStore();
  if (activeMenu === ActiveMenu.Upload) {
    return <Upload />;
  }
  if (activeMenu === ActiveMenu.Setting) {
    return <Settings />;
  }
  if (activeMenu === ActiveMenu.Resource) {
    return <FileApp />;
  }
  if (activeMenu === ActiveMenu.Statistic) {
    return <Statistic />;
  }
  return <div className='h-full overflow-hidden'>{activeMenu}</div>;
};
