import * as React from "react";
import { selectProjectStore } from "./select_project_store";
import { observer } from "mobx-react-lite";
import { LoadPage } from "../../../core/ui/pages/load_page";
import { CreateProjectScreenPath } from "../../create_project/create_project_screen";

export const SelectProjectScreenPath = "/select_project";

export const SelectProjectScreen: React.FunctionComponent = observer(() => {
  return (
    <>
      <LoadPage
        path={CreateProjectScreenPath}
        largeText={"Select project"}
        minText={"add new project?"}
        isLoading={selectProjectStore.isLoading}
        isError={selectProjectStore.isError}
        children={selectProjectStore.projects.map((el) => {
          return (
            <>
              <div>{el.description}</div>
              <div>+(РЕАЛИЗУЙ ТУТ ПЛЮСИК БЛЯТЬ ИЛИ КНОПКУ)</div>
            </>
          );
        })}
      />
    </>
  );
});
