"use client"; import { Fragment, useState } from "react"; import { Listbox, ListboxButton, ListboxOption, ListboxOptions, Transition } from "@headlessui/react"; import { CheckIcon, ChevronUpDownIcon } from "@heroicons/react/20/solid"; export interface SelectOption { label: string; value: string | number; icon?: React.ReactNode; color?: string; // Cor para badge/ponto } interface CustomSelectProps { options: SelectOption[]; value: string | number; onChange: (value: any) => void; label?: string; placeholder?: string; className?: string; buttonClassName?: string; } export default function CustomSelect({ options, value, onChange, label, placeholder = "Selecione...", className = "", buttonClassName = "" }: CustomSelectProps) { const selected = options.find((opt) => opt.value === value) || null; return (