import { ComputedRef } from 'vue';
import { MaybeRefOrGetter } from 'vue';

/**
 * The return value for `useSelection`
 */
export declare interface UseSelection<Item extends object> {
    /**
     * Sets the selection state to `true` for the given item unless selection is disabled for that item
     */
    select: (item: Item) => void;
    /**
     * Sets the selection state to `false` for the given item unless selection is disabled for that item
     */
    unselect: (item: Item) => void;
    /**
     * Toggles the given item's selection state unless selection is disabled for that item
     */
    selectToggle: (item: Item) => void;
    /**
     * Selects all items except those that have selection disabled
     */
    selectAll: () => void;
    /**
     * Unselects all items except those that have selection disabled
     */
    unselectAll: () => void;
    /**
     * Selects all non-disabled items if some are unselected, otherwise unselects all non-disabled items
     */
    selectToggleAll: () => void;
    /**
     * Resets the selected items to their initial selection state with respect to `shouldPreselect`. If `shouldPreselect` is not provided, then all non-disabled items will be unselected.
     */
    resetSelection: () => void;
    /**
     * Returns a boolean indicating if the given item is selected
     */
    isSelected: (item: Item) => boolean;
    /**
     * Returns a boolean indicating if the given item is disabled from changing its selection state
     */
    isSelectDisabled: (item: Item) => boolean;
    /**
     * A computed list of the currently selected items
     */
    selectedItems: ComputedRef<Item[]>;
    /**
     * A computed boolean indicating if all items are selected regardless if they are disabled
     */
    allSelected: ComputedRef<boolean>;
    /**
     * A computed boolean indicating if all non-disabled items are selected
     */
    allNonDisabledSelected: ComputedRef<boolean>;
    /**
     * A computed boolean indicating if one or more items are selected regardless if they are disabled
     */
    someSelected: ComputedRef<boolean>;
    /**
     * A computed boolean indicating if one or more non-disabled items are selected
     */
    someNonDisabledSelected: ComputedRef<boolean>;
}

declare function useSelection<Item extends object>({ items, trackBy, shouldDisable, shouldPreselect, }: UseSelectionArgs<Item>): UseSelection<Item>;
export default useSelection;

/**
 * The inputs for `useSelection`
 */
export declare interface UseSelectionArgs<Item extends object> {
    items: MaybeRefOrGetter<Item[]>;
    /**
     * The item key used as a unique identifier for each item. The default value is "id".
     */
    trackBy?: string;
    /**
     * A callback function that is used internally to determine if an item should be disabled from changing its selection state
     */
    shouldDisable?: (item: Item) => boolean;
    /**
     * A callback function that is used internally to determine if an item should be selected by default and when `resetSelection` is called
     */
    shouldPreselect?: (item: Item) => boolean;
}

export { }
