import{type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraEntity}from'../entity-card/entity-card.class.js';import type{LyraPathElement,LyraPathStripEventMap}from'../path-strip/path-strip.class.js';import type{LyraCommunity,LyraCommunityCardEventMap}from'../community-card/community-card.class.js';import type{LyraChunk,LyraChunkInspectorEventMap}from'../chunk-inspector/chunk-inspector.class.js';import type{LyraEntityChipEventMap}from'../entity-chip/entity-chip.class.js';import'../entity-chip/entity-chip.class.js';import'../path-strip/path-strip.class.js';import'../community-card/community-card.class.js';import'../chunk-inspector/chunk-inspector.class.js';import'../../overlays/empty/empty.class.js';import type{LyraNodeTypeStyle}from'../../../internal/node-type-style.js';export type{LyraNodeTypeStyle}from'../../../internal/node-type-style.js';import type{LyraScoreThresholds}from'../graph/graph.class.js';export interface LyraProvenance{readonly entities?:readonly LyraEntity[]; /** One `lr-path-strip` row each. */ readonly relationships?:readonly Readonly<{path:readonly LyraPathElement[];}>[];readonly communities?:readonly LyraCommunity[];readonly chunks?:readonly LyraChunk[];}type Section='entities'|'relationships'|'communities'|'chunks'; /** The panel is a conduit, so its event map is the union of every affordance it renders: its own * section toggle plus the entity chips', community cards', path strips', and chunk inspector's * events, all of which are `composed` and therefore reach a host listener on * `` itself. Declaring only `lr-toggle` typed those controls out of existence * for anyone building handlers off this type. */ export interface LyraProvenancePanelEventMap extends Omit,Omit,Omit,LyraChunkInspectorEventMap{ /** Canonical name for the "user picked this entity" gesture, surfaced unchanged from an * embedded entity chip. No composed child emits this with an `occurrenceIndex` (only the * community card and the relationship path strip's own `lr-entity-activate` do), so unlike * those this stays the plain shape. */ 'lr-entity-select':CustomEvent<{entityId:string;}>;'lr-entity-activate':CustomEvent<{entityId:string;occurrenceIndex?:number;}>;'lr-toggle':CustomEvent<{section:Section;expanded:boolean;}>;} /** * `` — the grounding breakdown for one answer: a sectioned disclosure * panel (Entities / Relationships / Communities / Text chunks) composing this family's own pieces. * The chat <-> graph <-> document glue component. Pure projection + event conduit: no fetching, no * graph/viewer imports, no persistence. * * 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-provenance-panel * @event lr-toggle - A section header was toggled. `detail: { section, expanded }`. * @event lr-entity-select - Surfaced unchanged from an embedded entity chip. * `detail: { entityId }`. * @event lr-entity-activate - Surfaced unchanged from an embedded community card or relationship * path strip. `detail: { entityId, occurrenceIndex? }`. * @event lr-entity-open - Surfaced unchanged from an embedded entity chip (double-click, or Space * while focused). `detail: { entityId }`. * @event lr-drill - Surfaced unchanged from an embedded community card's title, drill button, or * overflow chip. `detail: { communityId }`. * @event lr-relation-activate - Surfaced unchanged from an embedded relationship path strip's edge. * `detail: { relation, sourceNodeId?, targetNodeId?, occurrenceIndex }`. * @event lr-chunk-open - Surfaced unchanged from an embedded chunk inspector. * `detail: { chunkId, sourceId, anchor? }`. * @event lr-expand - Surfaced unchanged from an embedded chunk inspector. * `detail: { chunkId, expanded }`. * @csspart base - The root wrapper. * @csspart section - One section's wrapper. * @csspart header - A section's disclosure `