import { LitElement } from 'lit'; import type { ApexGridEnterprise } from './grid-enterprise.js'; export declare const AI_TAG = "apex-grid-ai"; /** * Prompt panel for the enterprise grid's AI Toolkit. Mount it beside a grid and * set its `grid` property: it sends a natural-language prompt through the grid's * {@link ApexGridEnterprise.runPrompt} (the built-in rule engine, plus any * {@link ApexGridEnterprise.aiReasoner}), then shows what changed with a one-click * **Undo**, or the answer in ask mode. * * Two container modes via `mode`: `'inline'` renders in place; `'dialog'` (the * default) is a floating, draggable panel. The element holds no API key and never * imports an LLM SDK: it only calls the grid, which owns the reasoning. * * @element apex-grid-ai * * A **source badge** shows whether each result came from the deterministic rule * engine or an LLM reasoner; **Preview** dry-runs the prompt through * {@link ApexGridEnterprise.previewPrompt} (nothing is applied) so the planned * steps can be inspected first; and a **transcript** logs past turns. * * @fires apex-ai-result - After a prompt resolves: `{ result }` (the {@link AIResult}). * @fires apex-ai-closed - When a dialog panel is dismissed. * * @csspart panel - The panel container. * @csspart header - Dialog header (drag handle + title + close). * @csspart close - Dialog close button. * @csspart body - The prompt + result body. * @csspart mode-button - A Control / Ask mode toggle button. * @csspart input - The prompt textarea. * @csspart send - The send / cancel button. * @csspart preview-button - The preview (dry-run) button. * @csspart result - The result region (applied summary or answer). * @csspart abstention - The region shown when the prompt could not be mapped. * @csspart preview - The preview region (planned steps, not applied). * @csspart source - The badge naming the reasoner that produced a result. * @csspart undo - The undo button (control mode). * @csspart warnings - The notes / warnings list. * @csspart notice - The thinking / empty notice. * @csspart error - The error message. * @csspart history - The transcript region. * @csspart history-item - One past turn in the transcript. * @csspart clear-history - The button that clears the transcript. */ export declare class ApexGridAI extends LitElement { #private; static get tagName(): string; static register(): void; static styles: import("lit").CSSResult; /** The enterprise grid to drive. Setting it binds the panel. */ grid: ApexGridEnterprise> | null; /** `'inline'` renders in place; `'dialog'` (default) is a floating, draggable panel. */ mode: 'inline' | 'dialog'; /** Dialog open state (no-op for `mode="inline"`). */ open: boolean; private prompt; private currentMode; private busy; private error; private result; private undone; private previewPlan; private transcript; disconnectedCallback(): void; /** Open the dialog panel and move focus into the prompt. */ show(): void; /** Close the dialog panel and notify (so a launcher can remove it). */ close(): void; protected render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { [AI_TAG]: ApexGridAI; } }