import React from "react"; // react-hook-form import { Control, Controller } from "react-hook-form"; // ui import { CustomSelect } from "components/ui"; // icons import { ChartBarIcon } from "@heroicons/react/24/outline"; import { getPriorityIcon } from "components/icons/priority-icon"; // types import { IIssue, UserAuth } from "types"; // constants import { PRIORITIES } from "constants/project"; type Props = { control: Control; submitChanges: (formData: Partial) => void; userAuth: UserAuth; }; export const SidebarPrioritySelect: React.FC = ({ control, submitChanges, userAuth }) => { const isNotAllowed = userAuth.isGuest || userAuth.isViewer; return (

Priority

( {getPriorityIcon(value && value !== "" ? value ?? "" : "None", "text-sm")} {value && value !== "" ? value : "None"} } value={value} onChange={(value: any) => { submitChanges({ priority: value }); }} disabled={isNotAllowed} > {PRIORITIES.map((option) => ( <> {getPriorityIcon(option, "text-sm")} {option ?? "None"} ))} )} />
); };