import { record } from '@synnaxlabs/x';
import { ReactElement } from 'react';
import { List } from '../list';
import { UseMultipleProps, UseSingleProps } from './use';
import { Store } from '../store';
interface SelectionState<K extends record.Key = record.Key> {
    value: K | K[] | null | undefined;
    hover?: K;
}
interface ContextValue<K extends record.Key = record.Key> extends Pick<Store.UseKeyedListenersReturn<K>, "subscribe"> {
    onSelect: (key: K) => void;
    setSelected: (keys: K[]) => void;
    clear: () => void;
    getState: () => SelectionState<K>;
}
export interface UseItemStateReturn {
    selected: boolean;
    hovered: boolean;
    onSelect: () => void;
}
export declare const useContext: <K extends record.Key = record.Key>() => ContextValue<K>;
export declare const useItemState: <K extends record.Key>(key: K) => UseItemStateReturn;
export declare const useSelection: <K extends record.Key>() => K[];
export declare const useClear: () => () => void;
export interface TriggerProps<K extends record.Key, E extends record.Keyed<K> | undefined> {
    value: K | null;
    useItem: (key: K) => E;
    onClick: () => void;
}
interface BaseFrameProps<K extends record.Key, E extends record.Keyed<K> | undefined> extends Omit<List.FrameProps<K, E>, "onChange"> {
}
export interface MultipleFrameProps<K extends record.Key, E extends record.Keyed<K> | undefined> extends BaseFrameProps<K, E>, UseMultipleProps<K> {
    multiple: true;
}
export interface SingleFrameProps<K extends record.Key = record.Key, E extends record.Keyed<K> | undefined = record.Keyed<K> | undefined> extends BaseFrameProps<K, E>, UseSingleProps<K> {
    multiple?: false;
}
export type FrameProps<K extends record.Key = record.Key, E extends record.Keyed<K> | undefined = record.Keyed<K>> = MultipleFrameProps<K, E> | SingleFrameProps<K, E>;
export declare const Frame: <K extends record.Key = record.Key, E extends record.Keyed<K> | undefined = record.Keyed<K>>({ data, getItem, subscribe, itemHeight, value, onChange, multiple, onFetchMore, virtual, ...rest }: FrameProps<K, E>) => ReactElement;
export {};
//# sourceMappingURL=Frame.d.ts.map