import { CollectionItem, GridCollectionOptions, GridCollection, SelectionMode, ListCollection } from '@zag-js/collection';
export { CollectionItem, CollectionOptions, FilePathTreeNode, FlatTreeNode, GridCollection, GridCollectionOptions, ListCollection, TreeCollection, TreeCollectionOptions, TreeNode } from '@zag-js/collection';
export { c as createListCollection } from '../../list-collection-nOYDJvsQ.js';
export { c as createFileTreeCollection, a as createTreeCollection } from '../../tree-collection-BGrnj3vg.js';
import * as asyncList from '@zag-js/async-list';
import { Accessor } from 'solid-js';
import { M as MaybeAccessor } from '../../types-Sr_80hg9.js';
export { U as UseListCollectionProps, a as UseListCollectionReturn, u as useListCollection } from '../../use-list-collection-Cknid_6N.js';

declare const createGridCollection: <T extends CollectionItem>(options: GridCollectionOptions<T>) => GridCollection<T>;

interface UseAsyncListProps<T, C = string> extends asyncList.Props<T, C> {
}
interface UseAsyncListReturn<T, C = string> extends Accessor<asyncList.Api<T, C>> {
}
declare const useAsyncList: <T, C = string>(props?: MaybeAccessor<UseAsyncListProps<T, C>>) => UseAsyncListReturn<T, C>;

interface UseListSelectionProps<T extends CollectionItem> {
    /**
     * The selection mode.
     */
    selectionMode?: SelectionMode;
    /**
     * Whether the selection is deselectable.
     */
    deselectable?: boolean;
    /**
     * The initial selected values.
     */
    initialSelectedValues?: string[];
    /**
     * Whether to reset the selection when the collection changes.
     */
    resetOnCollectionChange?: boolean;
    /**
     * The collection to use.
     */
    collection: ListCollection<T>;
}
declare function useListSelection<T extends CollectionItem>(props: MaybeAccessor<UseListSelectionProps<T>>): UseListSelectionReturn;
interface UseListSelectionReturn {
    /**
     * The selected values as an array.
     */
    selectedValues: () => string[];
    /**
     * Whether the selection is empty.
     */
    isEmpty: () => boolean;
    /**
     * The first selected value.
     */
    firstSelectedValue: () => string | null;
    /**
     * The last selected value.
     */
    lastSelectedValue: () => string | null;
    /**
     * Check if a value is selected.
     */
    isSelected: (value: string | null) => boolean;
    /**
     * Check if a value can be selected.
     */
    canSelect: (value: string) => boolean;
    /**
     * Select a value.
     */
    select: (value: string, forceToggle?: boolean) => void;
    /**
     * Deselect a value.
     */
    deselect: (value: string) => void;
    /**
     * Toggle selection of a value.
     */
    toggle: (value: string) => void;
    /**
     * Replace the selection with a single value.
     */
    replace: (value: string | null) => void;
    /**
     * Extend the selection from anchor to target.
     */
    extend: (anchorValue: string, targetValue: string) => void;
    /**
     * Set the selected values.
     */
    setSelectedValues: (values: string[]) => void;
    /**
     * Clear the selection.
     */
    clear: () => void;
    /**
     * Clear all selections.
     */
    resetSelection: () => void;
    /**
     * Returns true if all items from the collection are selected.
     */
    isAllSelected: () => boolean;
    /**
     * Returns true if at least one item from the collection is selected.
     */
    isSomeSelected: () => boolean;
}

export { type UseAsyncListProps, type UseAsyncListReturn, type UseListSelectionProps, type UseListSelectionReturn, createGridCollection, useAsyncList, useListSelection };
