import { useCallback, useMemo } from "react"; import { observer } from "mobx-react"; import { Check } from "lucide-react"; // plane packages import { cn } from "@plane/editor"; import { Dropdown } from "@plane/ui"; // constants import { EIssueLayoutTypes, ISSUE_LAYOUT_MAP } from "@/constants/issue"; type TLayoutDropDown = { onChange: (value: EIssueLayoutTypes) => void; value: EIssueLayoutTypes; }; export const LayoutDropDown = observer((props: TLayoutDropDown) => { const { onChange, value = EIssueLayoutTypes.LIST } = props; const options = useMemo( () => Object.values(ISSUE_LAYOUT_MAP).map((issueLayout) => ({ data: issueLayout.key, value: issueLayout.key, })), [] ); const buttonContent = useCallback((isOpen: boolean, buttonValue: string | string[] | undefined) => { const dropdownValue = ISSUE_LAYOUT_MAP[buttonValue as EIssueLayoutTypes]; return (