import type { CursorCoordinates } from '../components/input/tiptap';
import { type AutopilotChatResourceItem, type AutopilotChatResourceItemSelector } from '../service';
export interface DrillDownState {
    category: AutopilotChatResourceItemSelector;
    resources: AutopilotChatResourceItem[];
    done: boolean;
}
export interface PickerState {
    anchorPosition: CursorCoordinates | null;
    query: string;
    drillDown: DrillDownState | null;
    loading: boolean;
    loadingMore: boolean;
    searchInProgress: boolean;
    error: string | null;
    searchResults: AutopilotChatResourceItem[];
    searchDone: boolean;
    previousDisplayCount: number;
}
export type PickerAction = {
    type: 'OPEN';
    coords: CursorCoordinates;
} | {
    type: 'CLOSE';
} | {
    type: 'SET_QUERY';
    query: string;
} | {
    type: 'LOAD_START';
} | {
    type: 'SEARCH_START';
} | {
    type: 'LOAD_MORE_START';
} | {
    type: 'DRILL_DOWN_SUCCESS';
    category: AutopilotChatResourceItemSelector;
    resources: AutopilotChatResourceItem[];
    done: boolean;
} | {
    type: 'SEARCH_SUCCESS';
    results: AutopilotChatResourceItem[];
    done: boolean;
} | {
    type: 'LOAD_MORE_SUCCESS';
    target: 'drillDown' | 'search';
    items: AutopilotChatResourceItem[];
    done: boolean;
} | {
    type: 'LOAD_ERROR';
    error: string;
} | {
    type: 'GO_BACK';
} | {
    type: 'CLEAR_SEARCH';
};
export declare const initialPickerState: PickerState;
export declare function pickerReducer(state: PickerState, action: PickerAction): PickerState;
export declare function useResourcePickerState(): [PickerState, import("react").ActionDispatch<[action: PickerAction]>];
//# sourceMappingURL=use-resource-picker-state.d.ts.map