import type { OrganisationRecord, OrganisationResponse } from "@sprint/shared"; import { useState } from "react"; import { toast } from "sonner"; import { OrganisationModal } from "@/components/organisation-modal"; import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue, } from "@/components/ui/select"; export function OrganisationSelect({ organisations, selectedOrganisation, onSelectedOrganisationChange, onCreateOrganisation, placeholder = "Select Organisation", contentClass, showLabel = false, label = "Organisation", labelPosition = "top", }: { organisations: OrganisationResponse[]; selectedOrganisation: OrganisationResponse | null; onSelectedOrganisationChange: (organisation: OrganisationResponse | null) => void; onCreateOrganisation?: (org: OrganisationRecord) => void | Promise; placeholder?: string; contentClass?: string; showLabel?: boolean; label?: string; labelPosition?: "top" | "bottom"; }) { const [open, setOpen] = useState(false); return ( ); }