import{type TemplateResult,type PropertyValues}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraTimestamp}from'../timestamp.js';export interface ConversationItemRenameDetail{conversationId:string;label:string;}export interface ConversationItemSelectDetail{conversationId:string;}export interface LyraConversationItemEventMap{'lr-select':CustomEvent;'lr-rename':CustomEvent;blur:CustomEvent;focus:CustomEvent;} /** * `` — a selectable row representing one chat * session in a history sidebar list. Usable standalone or as the * `renderItem()` payload of a sibling virtualized-list component; this * module has no dependency on that (or any) other component. * * Takes `label`/`excerpt`/`timestamp` as individual primitive props rather * than one opaque bound object, deliberately consistent with how * `` takes individual props instead of a single * `.message` blob -- every other component in this family follows that * shape, so this one does too even though a single bound `.session` object * would also have been a reasonable design. * * `conversationId` is the stable domain identity carried by both selection and rename events; * native `id` remains available for document identity and CSS/ARIA references. * * `role="button"` on `[part="select-button"]` so the item has valid semantics both * standalone and when placed in a larger history-list layout. A conversation * row activates one current session; it is not itself a listbox option and * therefore does not require a particular owner role. * * `role="button"` forbids focusable * descendants -- verified against axe-core's `nested-interactive` rule, * which flags it. That's why the rename button and the `actions` slot are * rendered as DOM *siblings* of `[part="select-button"]` (both inside * `[part="base"]`) rather than nested inside it: `[part="select-button"]` only ever * contains plain text/`