import type { Plugin } from "@puckeditor/core"; export interface P1ChatbotOptions { /** * Called with the path of a page the chat created. Send the editor there: it is also * what keeps later turns aimed at the new page, whose context is built from whichever * document is open. */ onPageCreated: (path: string) => void; } export interface P1Chatbot { /** * Append to `useP1Editor`'s `additionalPlugins`. The list is the same whether or not * the chatbot is available, so the editor does not reload when availability changes. */ plugins: Plugin[]; /** Spread into `useP1Editor`'s `pluginOptions`. */ pluginOptions: { onGenerateWithAI: ((brief: string, page: { path: string; title?: string; }) => void) | undefined; showAIPanelToggle: boolean; }; /** * @deprecated No longer needed; always an empty string. Remove it from your editor's * extensions. */ editorKeySuffix: string; } /** * Resolve whether the AI chatbot is available to this editor, and everything needed to * mount it. Call it inside ``, where the signed-in editor is known. * * Availability is Pantheon's to decide, so an application wires the result through * without branching on it: an absent handler and a hidden toggle are what "off" looks * like. */ export declare function useP1Chatbot(options: P1ChatbotOptions): P1Chatbot;