import { FormDialog } from "@repo/shadcn-ui/components/form-dialog"; import { useTranslation } from "react-i18next"; import { PersonForm } from "./person-form"; import { SiteForm } from "./site-form"; export function InventoryQuickCreateDialog({ companyId, csrfToken, kind, onCreated, onClose, }: { companyId: string; csrfToken: string; kind: "site" | "person"; onCreated: (id: string) => void; onClose: () => void; }) { const { t } = useTranslation("companies"); const { t: assetTranslation } = useTranslation("assets"); return ( { if (!open) { onClose(); } }} open title={t(kind === "site" ? "newSite" : "newPerson")} >

{assetTranslation("relatedNotice")}

{kind === "site" ? ( { onCreated(id); onClose(); }} showTitle={false} /> ) : ( { onCreated(id); onClose(); }} requireActive /> )}
); }