import * as React from "react";
import { selectProjectStore } from "./select_project_store";
import { Loader } from "../../../core/ui/loader/loader";
import { observer } from "mobx-react-lite";
import { Header } from "../../../core/ui/header/header";
import { CreatePipelineScreenPath } from "../../create_pipeline/presentation/create_pipeline_screen";
import { LoadPage } from "../../../core/ui/pages/load_page";

export const SelectProjectScreenPath = "/select_project";

export const SelectProjectScreen: React.FunctionComponent = observer(() => {
  return (
    <>
      <LoadPage
        path={CreatePipelineScreenPath}
        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>
            </>
          );
        })}
      />
    </>
  );
});
