import { Ref, WritableComputedRef } from 'vue';
import { CacheOptions, EmitFn } from '../types';
type Primitive = string | number;
type ValueType = Primitive | Primitive[] | undefined;
type SelectOption<T extends Record<string, any>> = Omit<T, 'label' | 'value'> & {
    label: string;
    value: Primitive;
};
export type FormatOptions<T extends Record<string, any>> = (data: T[]) => SelectOption<T>[];
export interface UseSelectReturnType<T extends Record<string, any>, V extends ValueType = ValueType> {
    value: WritableComputedRef<V>;
    id: WritableComputedRef<number>;
    ids: WritableComputedRef<number[]>;
    key: WritableComputedRef<string>;
    keys: WritableComputedRef<string[]>;
    options: Ref<SelectOption<T>[]>;
    cacheData: Ref<SelectOption<T>[]>;
    refresh: (force?: boolean) => Promise<void>;
    select: (val: unknown) => void;
    change: (val: unknown) => void;
    clear: () => void;
    blur: (e: unknown) => void;
    focus: (e: unknown) => void;
    filterOptions: (keyword: string, remoteMethod?: (kw: string) => void) => void;
    formatOptions: FormatOptions<T>;
}
/**
 * @description 处理下拉框
 * @param {Ref<V>} propValue 属性值
 * @param {EmitFn} emit 事件
 * @param {CacheOptions} cacheOption 缓存选项
 * @returns 下拉框相关状态和方法
 */
export declare const useSelect: <T extends Record<string, any>, V extends ValueType = ValueType, E extends string = string>(propValue: Ref<V>, emit?: EmitFn<E>, cacheOption?: CacheOptions, otherOptions?: {
    labelKey?: string;
    valueKey?: string;
    autoRefresh?: boolean;
    formatOptions?: FormatOptions<T>;
}) => UseSelectReturnType<T, V>;
export {};
