import { SelectContentProps } from '@radix-ui/react-select';
import { AllHTMLAttributes, ReactNode } from 'react';

type CombinedRefs = {
    container: HTMLDivElement | null;
    dropdown: HTMLDivElement | null;
    trigger: HTMLButtonElement | null;
};
interface SelectProps extends Omit<AllHTMLAttributes<HTMLSelectElement>, 'onSelect'> {
    autoFocus?: boolean;
    children?: ReactNode;
    defaultValue?: string;
    description?: string;
    disabled?: boolean;
    displayedValue?: ReactNode;
    dropdown?: Partial<{
        className?: string;
    } & Omit<SelectContentProps, 'asChild'>>;
    fullWidth?: boolean;
    id?: string;
    label?: string;
    name?: string;
    open?: boolean;
    placeholder?: string;
    portalled?: boolean;
    readOnly?: boolean;
    required?: boolean;
    value?: string;
    onClose?: () => void;
    onOpen?: () => void;
    onSelect?: (newValue: string) => void;
}
interface SelectEmptyProps extends AllHTMLAttributes<HTMLDivElement> {
    children?: ReactNode;
    label?: string;
    value?: string;
}
interface SelectItemProps extends AllHTMLAttributes<HTMLDivElement> {
    value: string;
    children?: ReactNode;
    disabled?: boolean;
    label?: string;
}
interface SelectItemGroupProps extends AllHTMLAttributes<HTMLDivElement> {
    children: ReactNode;
    label: string;
    disabled?: boolean;
}
type SelectItemSeparatorProps = AllHTMLAttributes<HTMLDivElement>;

export type { CombinedRefs, SelectEmptyProps, SelectItemGroupProps, SelectItemProps, SelectItemSeparatorProps, SelectProps };
