// react import React, { useState } from "react"; // icons import { ChevronDown } from "lucide-react"; // constants import { PRIORITIES } from "constants/project"; // components import { getPriorityIcon } from "components/icons"; import { WebViewModal } from "./web-view-modal"; // helpers import { capitalizeFirstLetter } from "helpers/string.helper"; type Props = { value: any; onChange: (value: any) => void; disabled?: boolean; }; export const PrioritySelect: React.FC = (props) => { const { value, onChange, disabled = false } = props; const [isOpen, setIsOpen] = useState(false); return ( <> { setIsOpen(false); }} > ({ label: priority ? capitalizeFirstLetter(priority) : "None", value: priority, checked: priority === value, onClick: () => { setIsOpen(false); if (disabled) return; onChange(priority); }, icon: ( {getPriorityIcon(priority, "text-sm")} ), })) || [] } /> ); };