import { observer } from "mobx-react"; import { useParams } from "next/navigation"; // ui import { IIssueDisplayFilterOptions, IIssueDisplayProperties } from "@plane/types"; // components import { MultipleSelectGroupAction } from "@/components/core"; import { SpreadsheetHeaderColumn } from "@/components/issues/issue-layouts"; // constants import { SPREADSHEET_SELECT_GROUP } from "@/constants/spreadsheet"; // helpers import { cn } from "@/helpers/common.helper"; // hooks import { TSelectionHelper } from "@/hooks/use-multiple-select"; interface Props { displayProperties: IIssueDisplayProperties; displayFilters: IIssueDisplayFilterOptions; handleDisplayFilterUpdate: (data: Partial) => void; canEditProperties: (projectId: string | undefined) => boolean; isEstimateEnabled: boolean; spreadsheetColumnsList: (keyof IIssueDisplayProperties)[]; selectionHelpers: TSelectionHelper; } export const SpreadsheetHeader = observer((props: Props) => { const { displayProperties, displayFilters, handleDisplayFilterUpdate, canEditProperties, isEstimateEnabled, spreadsheetColumnsList, selectionHelpers, } = props; // router const { projectId } = useParams(); // derived values const isGroupSelectionEmpty = selectionHelpers.isGroupSelected(SPREADSHEET_SELECT_GROUP) === "empty"; // auth const canSelectIssues = canEditProperties(projectId?.toString()) && !selectionHelpers.isSelectionDisabled; return ( {canSelectIssues && (
)} Issues {spreadsheetColumnsList.map((property) => ( ))} ); });