import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{ToolApprovalEventDetail}from'../../../ai/types.js';import type{ToolApprovalDialogCloseReason}from'../tool-approval-dialog/tool-approval-dialog.class.js';import type{ApprovalDecision}from'../approval-state.js';export type ApprovalRequestStatus='pending'|ApprovalDecision; /** A host-owned tool call waiting for or carrying a human approval decision. */ export interface ToolApprovalRequest{id:string;toolName:string;args:unknown;status?:ApprovalRequestStatus;}export interface LyraApprovalQueueEventMap{'lr-approval-select':CustomEvent<{invocationId:string;}>;'lr-approval-decision':CustomEvent;'lr-approval-close':CustomEvent<{invocationId:string;reason:ToolApprovalDialogCloseReason;}>;} /** * `` — a controlled queue of tool calls that need human approval, with a * keyboard-accessible request list and a single reused ``. It never * executes tools, applies permissions, or persists decisions; the host owns those operations. * Empty request ids are omitted and duplicate ids normalize before counts, selection, rendering, * and events; the first valid occurrence wins. * * Public collection properties take bounded, clone-owned readonly snapshots. Create a new * collection and reassign it after changes; mutating the assigned array does not update the view. * * @customElement lr-approval-queue * @event lr-approval-select - A request was selected. `detail: { invocationId }`. * @event lr-approval-decision - A request was approved or denied. `detail: { invocationId, * approved, args? }`. Cancelable; preventing it keeps the nested dialog pending. * @event lr-approval-close - The nested decision dialog closed, or controlled requests invalidated * its formerly pending selection. `detail: { invocationId, reason }`; invalidation uses * `reason: 'request-invalidated'` after selection and open state are cleared. Non-cancelable. * @csspart base - The root queue wrapper. * @csspart heading-row - The heading and pending-count row. * @csspart heading - The visible queue heading. * @csspart count - The pending-count text. * @csspart list - The request list. * @csspart request - One selectable request row. * @csspart request-info - Request name and id wrapper. * @csspart tool-name - The proposed tool name. * @csspart request-id - The stable request id. * @csspart status - The request status badge. * @csspart empty - The empty state. * @cssprop [--lr-approval-queue-selected-border=var(--lr-color-brand)] - Selected request border. * @status stable * @since 6.2.0 */ export declare class LyraApprovalQueue extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[]; /** Requests in display order. Controlled and never mutated by this component. Empty ids are * omitted and duplicate ids normalize first-wins before counts, selection, dialog lookup, and * events. */ requests:readonly ToolApprovalRequest[]; /** Stable invocation identity of the request currently shown in the dialog, or `null` when none * is selected. */ selectedInvocationId:string|null; /** Whether the decision dialog is open. */ open:boolean; /** Allows argument editing in the nested approval dialog. */ editable:boolean; /** Accessible name and visible heading. Optional. Omitting it localizes the default * `approvalQueueLabel` message; an explicit empty string renders no visible/accessible label. */ label?:string;private nestedCloseInvocationId;private normalizedRequestsFor;private get normalizedRequests();private get selectedRequest();protected willUpdate(changed:PropertyValues):void;protected updated(changed:PropertyValues):void;private pendingCount;private formatCount;private statusLabel;private statusVariant;private select;private onApprove;private onDeny;private onClose;private renderRequest;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-approval-queue':LyraApprovalQueue;}}