import { FC } from "react";
import { DialogContent, DialogHeader, DialogTitle } from "~/components/ui/dialog";
import { Tabs, TabsContent, TabsList, TabsTrigger } from "~/components/ui/tabs";
import { CreateDatasetForm } from "~/pages/datasets/forms/CreateDatasetForm";
import { CreateFinetuningDatasetForm } from "~/pages/datasets/forms/CreateFinetuningDatasetForm";

export const CreateDatasetDialog: FC<{ isDialogOpen: boolean; setIsDialogOpen: any }> = ({
  isDialogOpen,
  setIsDialogOpen,
}) => {
  return (
    <DialogContent className="min-w-[600px]">
      <DialogHeader>
        <DialogTitle>Create Dataset</DialogTitle>
      </DialogHeader>
      <Tabs defaultValue="default">
        <TabsList className="grid w-full grid-cols-2">
          <TabsTrigger value="default">Default</TabsTrigger>
          <TabsTrigger value="finetuning">Fine-Tuning</TabsTrigger>
        </TabsList>
        <TabsContent value="default">
          <CreateDatasetForm isOpen={isDialogOpen} onClose={() => setIsDialogOpen(false)} />
        </TabsContent>
        <TabsContent value="finetuning">
          <CreateFinetuningDatasetForm isOpen={isDialogOpen} onClose={() => setIsDialogOpen(false)} />
        </TabsContent>
      </Tabs>
    </DialogContent>
  );
};
