import { AutocompleteProps } from '../Autocomplete/types';
import { Theme } from '@mui/material';
import { M4LOverridesStyleRules } from '../../../../@types/augmentations';
import { AUTOCOMPLETE_ASYNC_KEY_COMPONENT } from './constants';
import { AutocompleteAsyncSlots } from './slots/AutocompleteAsyncEnum';
export type OnChangeFilterParms = (newValue: string) => Record<string, any>;
/**
 * Props for the AutocompleteAsync component (extended/mui).
 * Manages options via fetch; value/onChange are passed by parent or by withRHFController.
 */
export interface AutocompleteAsyncProps<T = unknown> extends Omit<AutocompleteProps<T, boolean | undefined>, 'options' | 'onOpen' | 'onClose' | 'open'> {
    /** Optional text label for the field (when used without RHF wrappers). */
    label?: string;
    /** URL to fetch data from */
    endPoint: string;
    /** Whether the response should be converted to camel case */
    responseToCamelCase?: boolean;
    /** Timeout for the fetch request */
    timeout?: number;
    /** Parameters to send with the fetch request */
    parms?: Record<string, any>;
    /** Whether the URL is external */
    isExternalUrl?: boolean;
    /** Field in the response object that contains the data (e.g. 'data') */
    resultField?: string;
    /** Whether the data is fetched remotely */
    isRemote?: boolean;
    /** Callback to build filter params from input (e.g. for search); when set, multiple must be false */
    onChangeFilterParms?: OnChangeFilterParms;
    /** Width for skeleton placeholder when loading (e.g. in storybook or SSR) */
    skeletonWidth?: string | number;
    /** Input autoCapitalize (passed to underlying input when used in forms/filters) */
    autoCapitalize?: string;
    /** Input autoComplete (passed to underlying input when used in forms/filters) */
    autoComplete?: string;
    /** Input type (passed to underlying input when used in forms/filters) */
    type?: string;
}
export type AutocompleteAsyncSlotsType = keyof typeof AutocompleteAsyncSlots;
export type AutocompleteAsyncStyles = M4LOverridesStyleRules<AutocompleteAsyncSlotsType, typeof AUTOCOMPLETE_ASYNC_KEY_COMPONENT, Theme>;
/** Reducer action types for AutocompleteAsync */
export declare const actionsType: {
    readonly REFRESH: "REFRESH";
    readonly SET_PARAMS: "SET_PARAMS";
    readonly SET_QUERY_PARAMS: "SET_QUERY_PARAMS";
    readonly OPEN: "OPEN";
    readonly CLOSE: "CLOSE";
    readonly START_FETCHING_OPTIONS: "START_FETCHING_OPTIONS";
    readonly FINISH_LOAD_OPTIONS: "FINISH_LOAD_OPTIONS";
};
export type AutocompleteAsyncAction<T> = {
    type: typeof actionsType.REFRESH;
} | {
    type: typeof actionsType.SET_QUERY_PARAMS;
    payload: Record<string, any>;
} | {
    type: typeof actionsType.FINISH_LOAD_OPTIONS;
    payload: {
        options?: Array<T>;
    };
} | {
    type: typeof actionsType.OPEN;
} | {
    type: typeof actionsType.CLOSE;
} | {
    type: typeof actionsType.SET_PARAMS;
    payload: Record<string, any> | undefined;
};
export type AutocompleteAsyncState<T> = {
    options: Array<T>;
    loading: boolean;
    parms?: Record<string, any>;
    queryParams: Record<string, any>;
    isOpen: boolean;
    firstOpen: boolean;
    fireFetchCount: number;
};
export interface UseFetchOptionsProps<T> extends Pick<AutocompleteAsyncProps<T>, 'endPoint' | 'timeout' | 'isExternalUrl' | 'parms' | 'responseToCamelCase' | 'isRemote' | 'resultField'> {
    state: AutocompleteAsyncState<T>;
    dispatch: (value: AutocompleteAsyncAction<T>) => void;
}
//# sourceMappingURL=types.d.ts.map