"use client"; // types import { Briefcase, FileText, LayoutGrid } from "lucide-react"; import { IWorkspaceDefaultSearchResult, IWorkspaceIssueSearchResult, IWorkspaceProjectSearchResult, IWorkspaceSearchResult, } from "@plane/types"; import { ContrastIcon, DiceIcon, LayersIcon, PhotoFilterIcon } from "@plane/ui"; export const commandGroups: { [key: string]: { icon: JSX.Element; itemName: (item: any) => React.ReactNode; path: (item: any) => string; title: string; }; } = { cycle: { icon: , itemName: (cycle: IWorkspaceDefaultSearchResult) => (
{cycle.project__identifier} {cycle.name}
), path: (cycle: IWorkspaceDefaultSearchResult) => `/${cycle?.workspace__slug}/projects/${cycle?.project_id}/cycles/${cycle?.id}`, title: "Cycles", }, issue: { icon: , itemName: (issue: IWorkspaceIssueSearchResult) => (
{issue.project__identifier}-{issue.sequence_id} {" "} {issue.name}
), path: (issue: IWorkspaceIssueSearchResult) => `/${issue?.workspace__slug}/projects/${issue?.project_id}/issues/${issue?.id}`, title: "Issues", }, issue_view: { icon: , itemName: (view: IWorkspaceDefaultSearchResult) => (
{view.project__identifier} {view.name}
), path: (view: IWorkspaceDefaultSearchResult) => `/${view?.workspace__slug}/projects/${view?.project_id}/views/${view?.id}`, title: "Views", }, module: { icon: , itemName: (module: IWorkspaceDefaultSearchResult) => (
{module.project__identifier} {module.name}
), path: (module: IWorkspaceDefaultSearchResult) => `/${module?.workspace__slug}/projects/${module?.project_id}/modules/${module?.id}`, title: "Modules", }, page: { icon: , itemName: (page: IWorkspaceDefaultSearchResult) => (
{page.project__identifier} {page.name}
), path: (page: IWorkspaceDefaultSearchResult) => `/${page?.workspace__slug}/projects/${page?.project_id}/pages/${page?.id}`, title: "Pages", }, project: { icon: , itemName: (project: IWorkspaceProjectSearchResult) => project?.name, path: (project: IWorkspaceProjectSearchResult) => `/${project?.workspace__slug}/projects/${project?.id}/issues/`, title: "Projects", }, workspace: { icon: , itemName: (workspace: IWorkspaceSearchResult) => workspace?.name, path: (workspace: IWorkspaceSearchResult) => `/${workspace?.slug}/`, title: "Workspaces", }, };