import type{LyraEventDetailSnapshot}from'../../../internal/lyra-element.js';import{type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraHeadingLevel}from'../../../internal/heading-level.js';import'../../data/stat/stat.class.js';import'../citation-badge/citation-badge.class.js';import'../../overlays/empty/empty.class.js';import type{Citation,CitationSelectEventDetail,GroundedClaim,GroundingAssessment}from'../../../ai/types.js';import'../claim-evidence/claim-evidence.class.js';import type{LyraScoreThresholds}from'../graph/graph.class.js';export interface LyraGroundingSummaryEventMap{'lr-citation-select':CustomEvent>;'lr-claim-select':CustomEvent>;} /** * `` -- the claim-level scorecard for one generated answer: supported/ * unsupported claim counts, citation coverage, an optional confidence score, any warnings, and * (when `citations` is supplied) a list of evidence citations linking back to their exact spans. * Consumes `GroundingAssessment` from `src/ai/types.ts` directly as its primary input. Pure * projection + event conduit: never fetches or computes an assessment itself. * * Composes `` for every numeric display (claim counts, coverage, confidence) and * `` for each evidence entry -- this component defines no numeric-badge or * citation-link markup of its own. * * This component contains ``'s raw `lr-citation-activate` event and emits the richer * `lr-citation-select` (`detail: { citation }`, `CitationSelectEventDetail` from `src/ai/types.ts`) * carrying the full `Citation` -- including its `span` -- since a bare `sourceId`/`index` pair * can't by itself tell a host which exact evidence span to jump to. * * Public collection sequences are bounded, frozen snapshots. The assessment and admitted * claim/citation source identities remain opaque while descriptor-safe projections copy fields * used for display, lookup, and composition once; later rendering and events never reread a * source record. Create a new collection and reassign it after changes; mutating the assigned * array does not update the view. Blank claim/citation ids and later duplicates are ignored before * counts, lookup, rendering, or activation. The first record for an id wins. * * @customElement lr-grounding-summary * @event lr-citation-select - An evidence citation badge was activated. `detail: { citation }`. * @event lr-claim-select - A composed claim-evidence row was activated. `detail: { claim }`. * @csspart base - The root wrapper. It owns `role="group"` and the fallback name unless a * non-empty host `aria-label` makes the host the sole overall owner. * @csspart stats - Container for the claim-count/coverage/confidence `` row. * @csspart warnings - Wrapper for the warnings section. Omitted when there are no warnings. * @csspart warnings-heading - The "Warnings" heading text. * @csspart warnings-count - The warnings count. * @csspart warnings-list - The `
    ` of warning messages. * @csspart warning - One warning `
  • `. * @csspart evidence - Wrapper for the evidence section. Omitted when `citations` is empty. * @csspart evidence-heading - The "Evidence" heading text. * @csspart evidence-count - The evidence count. * @csspart evidence-item - One citation's row (badge + always-visible label/span text). * @csspart evidence-label - A citation's `label`, shown next to its badge (omitted when unset). * @csspart evidence-span - A citation's formatted `span` range, shown next to its badge (omitted * when `span` is unset). * @csspart evidence-list - The semantic list containing the evidence citations. * @csspart claims - Claim-level evidence, when present and enabled. * @csspart empty - The empty-state message, shown when `assessment` is `null`. * @status stable * @since 4.1.0 */ export declare class LyraGroundingSummary extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[]; /** Assessment is a closed schema projected below without generic record enumeration. */ protected static readonly identityCollectionObjectProperties:readonly string[]; /** Citation records carry opaque caller fields returned by the public selection event. */ protected static readonly identityCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[];protected static readonly immutableEventDetails:readonly string[]; /** Preserve admitted source identities inside the otherwise frozen event envelopes. */ protected static readonly identityEventDetailProperties:Readonly<{'lr-citation-select':readonly string[];'lr-claim-select':readonly string[];}>; /** The assessment to summarize. `null` (the default) renders the empty state. */ assessment:Readonly |null; /** Evidence citations backing the assessment, each rendered as an `` linking * back to its exact `span`. Independent of `assessment` -- the evidence section is simply * omitted when this is empty, same as the warnings section is omitted when `assessment.warnings` * is empty/unset. */ citations:readonly Citation[]; /** Tone thresholds applied to both `coverage` and `confidence` (both 0-1 fractions): at or above * `high` renders `success`, at or above `medium` renders `warning`, below `medium` renders * `danger`. */ thresholds:LyraScoreThresholds; /** Accessible name used by the stable group when the host has no `aria-label`; falls back to the * localized `groundingSummaryLabel` default. An explicitly empty host label stays empty, and so * does an explicitly empty `label`. */ label?:string; /** Renders `assessment.claims` through `` when available. */ showClaims:boolean; /** Semantic level of the warnings and evidence section headings. Use `none` to keep the visual * heading text without exposing it to heading navigation. Invalid untyped values use level 3. */ headingLevel:LyraHeadingLevel;private readonly canonicalAssessmentBySource;private readonly canonicalCitationsBySource;private get normalizedAssessment();private get normalizedCitations();private sectionHeading;private tone;private formatPercent;private onCitationSelect;private onNestedCitationSelect;private onNestedClaimSelect;private renderEvidenceItem;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-grounding-summary':LyraGroundingSummary;}}