import { FineTuneWithDatasetDto } from "~/browser-client";
import { FC } from "react";
import { Button } from "~/components/ui/button";
import { FineTunesTable } from "~/pages/finetuning/FineTunesTable";
import { PageDocLink } from "~/pages/layouts/PageDocLink";
import { PageLayout } from "~/pages/layouts/PageLayout";
import { PageSubtitle } from "~/pages/layouts/PageSubtitle";
import { LayoutBreadcrumb } from "~/pages/layouts/types";
import { Routes } from "~/routes";

export const FineTuningPage: FC<{ fineTunes: FineTuneWithDatasetDto[] }> = ({ fineTunes }) => {
  const breadcrumbs: LayoutBreadcrumb[] = [
    {
      label: "Fine-Tuning",
    },
  ];

  const subtitle = () => {
    return (
      <PageSubtitle>
        Fine-tune models using your datasets.{" "}
        <PageDocLink to={Routes.external.docs.fineTuning}>Fine-Tuning Docs.</PageDocLink>
      </PageSubtitle>
    );
  };

  const action = () => {
    return (
      <div className={"flex gap-2"}>
        <Button>Create Fine-Tune</Button>
      </div>
    );
  };

  return (
    <PageLayout breadcrumbs={breadcrumbs} subtitle={subtitle}>
      <FineTunesTable fineTunes={fineTunes} />
    </PageLayout>
  );
};
