import{type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import'../../overlays/badge/badge.class.js';import'../../layout/details/details.class.js';import'../../overlays/empty/empty.class.js'; /** Outcome of one guardrail/permission/privacy/tool-policy decision. */ export type PolicyDecisionState='allow'|'deny'|'needs-review'; /** The domain a decision came from — the four kinds this component is built to summarize. */ export type PolicyDecisionCategory='guardrail'|'permission'|'privacy'|'tool'; /** * One resolved policy decision. Read-only, display-only data -- this component never mutates a * decision or offers a "resolve"/"acknowledge" action; see ``/ * `` for an actual approve/deny gate. */ export interface PolicyDecision{id:string;category:PolicyDecisionCategory; /** The rule/policy's display name, e.g. "Read customer records" or a tool name for `category: * 'tool'`. Rendered as-is, not localized (host-supplied data). */ label:string;state:PolicyDecisionState; /** Always-visible plain-text reason for the decision -- never conveyed by `state`'s color alone. */ explanation:string; /** Optional richer detail (matched rule text, policy id, cited evidence), revealed through * progressive disclosure instead of always rendering alongside `explanation`. */ detail?:string;} /** * `` — a read-only list of guardrail, permission, privacy, and tool-policy * decisions, each carrying an `allow` / `deny` / `needs-review` state and an always-visible, * accessible explanation of why that decision was made -- never conveyed by color alone. * * Composes `` for the compact per-decision state indicator and renders the historical * explanation as ordinary text, so mounting an existing policy record does not announce it as a * fresh alert or status change. `` renders a decision's optional richer `detail` (matched rule text, * policy id, cited evidence) behind progressive disclosure, collapsed by default, instead of * always showing it alongside the shorter `explanation`. * * `decisions` is controlled and never mutated by this component -- pass a new array (e.g. as a * guardrail pipeline resolves) to update it. This is a summary surface, not an approval gate: * there is no per-decision action here, and a decision's `state` is fixed data, not something a * viewer can change from this component. * * 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-policy-summary * @csspart base - The root wrapper, only rendered while `decisions` is non-empty. * @csspart summary - The always-visible allow/deny/needs-review count row. * @csspart count - One state's localized count text; carries `data-state`. * @csspart list - The `role="list"` wrapper around every decision row. Its purpose-specific name * is the localized `policySummaryLabel`; a host `aria-label` names the host and is not cloned * onto this nested semantic owner. * @csspart decision - One decision row (`role="listitem"`); carries `data-state` and `data-category`. * @csspart decision-header - The row's category/label/state-badge line. * @csspart category - The decision's localized category text. * @csspart label - The decision's `label` text. * @csspart state-badge - The resolved `` state indicator. * @csspart explanation - The always-visible historical `explanation` text. * @csspart detail - The `` progressive-disclosure panel for `detail`, only rendered * when a decision defines one. * @csspart empty - The `` shown when `decisions` is empty. * @cssprop [--lr-policy-summary-count-allow-color=var(--lr-color-success)] - Text color of the * `allow` count. * @cssprop [--lr-policy-summary-count-deny-color=var(--lr-color-danger)] - Text color of the `deny` * count. * @cssprop [--lr-policy-summary-count-needs-review-color=var(--lr-color-warning)] - Text color of the * `needs-review` count. Restyling a state count otherwise requires overriding the library-wide * status tokens, since `::part(count)[data-state]` is invalid CSS. * @status stable * @since 4.1.0 */ export declare class LyraPolicySummary extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[]; /** The decisions to render, in the given order. Controlled and never mutated by this component * -- pass a new array to update it. Empty/blank ids are omitted, duplicates normalize * first-wins before counts/rendering, and a decision with an out-of-union `category`/`state` * is dropped rather than rendered. */ decisions:readonly PolicyDecision[];private get normalizedDecisions();private countOf;private stopNestedLifecycle;private renderDecision;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-policy-summary':LyraPolicySummary;}}