type SingleOptions<T> = {
    multiple?: false;
    externalSelected?: T;
    onChange?: (newSelection: T) => void;
};
type MultipleOptions<T> = {
    multiple: true;
    externalSelected?: T[];
    onChange?: (newSelection: T[]) => void;
};
type MultipleBaseOptions<T> = MultipleOptions<T> | SingleOptions<T>;
type Options<T> = MultipleBaseOptions<T>;
export declare const useSelected: <T>({ multiple, externalSelected, onChange }: Options<T>) => {
    selectedValues: T[];
    handleChange: (value: T) => void;
};
export {};
