import type { SlashCommandActionId, SlashCommandSummaryAction, SlashCommandSummary } from "../types/component.types";
export type { SlashCommandActionId, SlashCommandSummaryAction, SlashCommandSummary, };
/**
 * Fetch slash-command suggestions for the CURRENT deployment platform,
 * matching id-prefix `prefix`. The chat source is server-resolved — the
 * client sends NO `source` param on the URL.
 *
 * `commandsUrl` is required — supplied by `useChatRuntime().endpoints.commandsUrl`
 * at the call site. NO default value.
 *
 * URL handling: `new URL(commandsUrl, window.location.origin)` works
 * for both relative (e.g. `/api/mingo-guide/commands` → resolved against
 * the embedder origin, proxy handles it) and absolute
 * (e.g. `https://hub.openframe.ai/api/commands` → the base arg is
 * ignored).
 *
 * Auth: rides on `embedAuthedFetch` (same bearer-act-as + 401 self-heal
 * as the chat stream / identity / attachment calls) so a host that runs
 * proxy-impersonation or a refresh-capable auth adapter gets its creds
 * attached here too — no host-side `window.fetch` patch required. Hosts
 * with no adapter fall through to cookie auth unchanged.
 *
 * Returns the parsed `commands` array; on any non-2xx (auth,
 * rate-limit, chat-disabled) returns an empty array — the autocomplete
 * UI silently shows no suggestions rather than surfacing 401/403/429
 * toasts.
 */
export declare function fetchSlashCommands(prefix: string, signal: AbortSignal | undefined, commandsUrl: string): Promise<SlashCommandSummary[]>;
/**
 * Debounced, cancellable React hook. Returns `{ commands, loading }`.
 *
 * `commandsUrl` is required — pass `useChatRuntime().endpoints.commandsUrl`.
 */
export declare function useSlashCommands(prefix: string | null, commandsUrl: string): {
    commands: SlashCommandSummary[];
    loading: boolean;
};
/**
 * The full slash-command registry (empty-prefix fetch), shared via
 * react-query so every consumer in one chat surface dedupes to a SINGLE
 * network request.
 *
 * Keyed on `commandsUrl` ALONE — the request sends no `source` param (the
 * hub resolves source server-side), so the URL fully determines the
 * response. Both the onboarding-card list in `<EmbeddableChat>` and the
 * SSE adapter's `displayRef` table lookup read from this one cache entry
 * instead of each firing their own `fetchSlashCommands('')`.
 *
 * `staleTime`/`gcTime: Infinity` → static per session, so toggling modes
 * or remounting the (close-on-unmount) drawer reads from cache, never
 * refetches.
 *
 * `enabled` gates the live fetch: pass `activeMode === 'guide'` (or the
 * SSE adapter's `active` flag) so opening the panel in Mingo mode does
 * NOT hit the commands endpoint at all.
 */
export declare function useSlashCommandRegistry(commandsUrl: string, options?: {
    enabled?: boolean;
}): {
    commands: SlashCommandSummary[];
    loading: boolean;
    loaded: boolean;
};
//# sourceMappingURL=use-slash-commands.d.ts.map