/* eslint-disable max-lines */ import { BsCheckCircleFill } from "react-icons/bs"; import Popover from "@/lib/components/ui/Popover"; type SelectOptionProps = { label: string; value: T; }; type SelectProps = { options: SelectOptionProps[]; value?: T; onChange: (option: T) => void; label?: string; readOnly?: boolean; }; const selectedStyle = "rounded-lg bg-black text-white"; export const Select = ({ onChange, options, value, label, readOnly = false, }: SelectProps): JSX.Element => { const selectedValueLabel = options.find( (option) => option.value === value )?.label; if (readOnly) { return (
{label !== undefined && ( )}
); } return (
{label !== undefined && ( )}
{selectedValueLabel ?? label ?? "Select"} } CloseTrigger={
} >
    {options.map((option) => (
  • onChange(option.value)} >
    {option.label} {value === option.value && }
  • ))}
); };