import { useRouter } from "next/router"; // mobx import { observer } from "mobx-react-lite"; import { useMobxStore } from "lib/mobx/store-provider"; // ui import { Tooltip } from "components/ui"; // icons import { MoreHorizontal } from "lucide-react"; // types import { ICustomAttribute } from "types"; type Props = { objectId: string; option: ICustomAttribute; }; export const SelectOption: React.FC = observer(({ objectId, option }) => { const router = useRouter(); const { workspaceSlug } = router.query; const { customAttributes: customAttributesStore } = useMobxStore(); const { updateAttributeOption } = customAttributesStore; const handleSetAsDefault = async () => { if (!workspaceSlug || !option.parent) return; await updateAttributeOption(workspaceSlug.toString(), objectId, option.parent, option.id, { is_default: true, }); }; return (
{/* */}

{option.display_name}

{option.is_default ? ( Default ) : ( )}
); });