/* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable max-lines */ import { useTranslation } from "react-i18next"; import { MdAdd } from "react-icons/md"; import { PublicPrompts } from "@/app/brains-management/[brainId]/components/BrainManagementTabs/components/SettingsTab/components/PublicPrompts"; import Button from "@/lib/components/ui/Button"; import Field from "@/lib/components/ui/Field"; import { Modal } from "@/lib/components/ui/Modal"; import { freeModels, paidModels, } from "@/lib/context/BrainConfigProvider/types"; import { defineMaxTokens } from "@/lib/helpers/defineMaxTokens"; import { useAddBrainModal } from "./hooks/useAddBrainModal"; import { Divider } from "../ui/Divider"; import { TextArea } from "../ui/TextArea"; export const AddBrainModal = (): JSX.Element => { const { t } = useTranslation(["translation", "brain", "config"]); const { handleSubmit, isShareModalOpen, setIsShareModalOpen, register, openAiKey, temperature, maxTokens, model, isPending, pickPublicPrompt, } = useAddBrainModal(); return ( void 0} variant={"tertiary"} className="border-0" > {t("newBrain", { ns: "brain" })} } title={t("newBrainTitle", { ns: "brain" })} desc={t("newBrainSubtitle", { ns: "brain" })} isOpen={isShareModalOpen} setOpen={setIsShareModalOpen} CloseTrigger={
} >
{ e.preventDefault(); void handleSubmit(); }} className="my-10 flex flex-col items-center gap-2" >