import { SelectableCollection, SelectableData } from '../models';
import { Icon } from 'itlab-icons';
import { MaybeRefOrGetter, ModelRef, WritableComputedRef } from 'vue';
type SharedPropsAndConfig<TData, TValue extends (TData | undefined) | TData[]> = {
    placeholder?: TValue | string;
    preventUndefined?: boolean;
    search?: boolean | string;
    keepOpen?: boolean;
    isResetable?: boolean;
};
export type SelectableProps<TData, TValue extends (TData | undefined) | TData[]> = SharedPropsAndConfig<TData, TValue> & {
    dataset?: SelectableData<TData>[] | SelectableCollection<TData>;
};
export type SelectableConfig<TData, TValue extends (TData | undefined) | TData[]> = SharedPropsAndConfig<TData, TValue> & {
    selection: ModelRef<TValue> | WritableComputedRef<TValue>;
    dataset: MaybeRefOrGetter<SelectableData<TData>[] | SelectableCollection<TData> | undefined>;
    icon?: Icon;
};
export type Selectable<TData> = {
    dataset: SelectableData<TData>[];
    hasSelectables: boolean;
    selectionCount: number;
    hasSelection: boolean;
    isSelected: (value: TData) => boolean;
    toggleIsSelected: (value: TData) => void;
    isResetable: boolean | undefined;
    resetSelection: () => void;
    displayLabel: string | undefined;
    displayLabelCount: string | undefined;
    displayDescription: string | undefined;
    displayIcon: Icon | undefined;
    displayPlaceholder: string | undefined;
    hasSearch: boolean;
    searchQuery: string;
    searchPlaceholder: string;
    keepOpen: (data: TData) => boolean;
};
export declare function useSelectable<TData, TValue extends (TData | undefined) | TData[]>(cfg: SelectableConfig<TData, TValue>): Selectable<TData>;
export {};
