import React from "react"; // ui import { CustomSelect, Tooltip } from "components/ui"; // icons import { getPriorityIcon } from "components/icons/priority-icon"; // types import { IIssue } from "types"; // constants import { PRIORITIES } from "constants/project"; // services import trackEventServices from "services/track-event.service"; type Props = { issue: IIssue; partialUpdateIssue: (formData: Partial) => void; position?: "left" | "right"; selfPositioned?: boolean; isNotAllowed: boolean; }; export const ViewPrioritySelect: React.FC = ({ issue, partialUpdateIssue, position = "left", selfPositioned = false, isNotAllowed, }) => ( { partialUpdateIssue({ priority: data, state: issue.state, target_date: issue.target_date }); trackEventServices.trackIssuePartialPropertyUpdateEvent( { workspaceSlug: issue.workspace_detail.slug, workspaceId: issue.workspace_detail.id, projectId: issue.project_detail.id, projectIdentifier: issue.project_detail.identifier, projectName: issue.project_detail.name, issueId: issue.id, }, "ISSUE_PROPERTY_UPDATE_PRIORITY" ); }} maxHeight="md" customButton={ } noChevron disabled={isNotAllowed} position={position} selfPositioned={selfPositioned} > {PRIORITIES?.map((priority) => ( <> {getPriorityIcon(priority, "text-sm")} {priority ?? "None"} ))} );