import { FC } from "react"; import Link from "next/link"; import { Combobox } from "@headlessui/react"; import { GripVertical, MoreVertical } from "lucide-react"; // hooks import { useViewDetail } from "hooks/store"; // ui import { PhotoFilterIcon, Tooltip } from "@plane/ui"; // types import { TViewTypes } from "@plane/types"; type TViewDropdownItem = { workspaceSlug: string; projectId: string | undefined; viewId: string; viewType: TViewTypes; currentViewId: string; searchQuery: string; baseRoute: string; }; export const ViewDropdownItem: FC = (props) => { const { workspaceSlug, projectId, viewId, viewType, currentViewId, searchQuery, baseRoute } = props; // hooks const viewDetailStore = useViewDetail(workspaceSlug, projectId, viewId, viewType); const isDragEnabled = false; const isEditable = !viewDetailStore?.is_local_view || false; if (!viewDetailStore) return <>; if (!searchQuery || (searchQuery && viewDetailStore?.name?.toLowerCase().includes(searchQuery.toLowerCase()))) return (
{isDragEnabled && (
)}
{viewDetailStore?.name}
{isEditable && (
)}
); return <>; };