import { TextFieldProps } from '@mui/material';
import { AutocompleteProps } from '@mui/material/Autocomplete';
import { SelectDataType } from '../types';
import { AutocompleteChangeDetails, AutocompleteChangeReason, AutocompleteValue } from './types';
export type MoreTagsRenderProps = {
    extraCount: number;
    extraOptions: any[];
    allOptions: any[];
};
export type MoreTagsRender = ({ extraCount, extraOptions, allOptions, }: MoreTagsRenderProps) => React.ReactNode;
export type GenericProps<T = any> = {
    label?: string;
    input?: Omit<TextFieldProps<"outlined">, "variant">;
    keyField?: string;
    customOptionsFormat?: (option: T) => string;
    defaultKeys?: string[];
    error?: string;
    name?: string;
    showHint?: boolean;
    debug?: boolean;
    checkboxes?: boolean;
    helperDescription?: string;
    inputProps?: TextFieldProps<"outlined">["InputProps"];
    helperText?: string;
    comparisonField?: keyof T | ((option: T) => any);
    required?: boolean;
    customLimitRender?: MoreTagsRender;
    mode?: "fetch" | "offline" | "query";
    rounded?: "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "full";
    /**
     * @name testId
     * @description Optional data-testid attribute for E2E testing with Playwright/Cypress.
     * Applied to the underlying TextField input element.
     * @default undefined
     * @type string
     * @example
     * ```tsx
     * <Selector testId="user-selector" label="Select User" options={users} />
     * // Renders: <input data-testid="user-selector" />
     * ```
     */
    testId?: string;
};
export type MultipleProps<T, Multiple extends boolean | undefined> = Multiple extends true ? {
    onDeleteTag?: (option: T) => void;
} : {
    onDeleteTag?: never;
};
export type OfflineGenericProps<T> = {
    options: T[];
    loading?: boolean;
    extraOptionRender?: {
        pre?: ({ option, selected }: {
            option: T;
            selected: boolean;
        }) => React.ReactNode;
        post?: ({ option, selected }: {
            option: T;
            selected: boolean;
        }) => React.ReactNode;
    };
};
export type AutocompleteOnChange<T, Multiple = false, DisableClearable = false, FreeSolo = false> = (value: AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>, reason: AutocompleteChangeReason, details?: AutocompleteChangeDetails<T>) => void;
export type SelectorOnlyProps<T, Multiple, DisableClearable, FreeSolo> = {
    value?: AutocompleteValue<T, Multiple, DisableClearable, FreeSolo>;
    onChange?: AutocompleteOnChange<T, Multiple, DisableClearable, FreeSolo>;
};
export type AutocompleteGenerics<T, Multiple extends boolean | undefined, DisableClearable extends boolean | undefined, FreeSolo extends boolean | undefined> = Omit<AutocompleteProps<T, Multiple, DisableClearable, FreeSolo>, "renderInput" | "options" | "value" | "onChange" | "prefix">;
export type SelectorPropsBase<T, Multiple extends boolean | undefined, FreeSolo extends boolean | undefined, DisableClearable extends boolean | undefined> = GenericProps & OfflineGenericProps<T> & SelectorOnlyProps<T, Multiple, DisableClearable, FreeSolo> & AutocompleteGenerics<T, Multiple, DisableClearable, FreeSolo>;
export type SelectorProps<T extends SelectDataType = any, Multiple extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, DisableClearable extends boolean | undefined = false> = SelectorPropsBase<T, Multiple, DisableClearable, FreeSolo> & MultipleProps<T, Multiple> & {
    readOnly?: boolean;
};
export declare const Selector: <T extends SelectDataType = any, Multiple extends boolean | undefined = false, FreeSolo extends boolean | undefined = false, DisableClearable extends boolean | undefined = false>({ label, keyField, freeSolo, required, extraOptionRender, inputProps, helperText, customOptionsFormat, onChange, showHint, error, mode, options, defaultKeys, checkboxes, testId, ...props }: SelectorProps<T, Multiple, DisableClearable, FreeSolo>) => import("react/jsx-runtime").JSX.Element;
//# sourceMappingURL=Selector.d.ts.map