import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import type{LyraCatalog,LyraModelCatalogEntry}from'../model-select/model-select.class.js';import'../model-select/model-select.class.js';import'../../forms/slider/slider.class.js';export type ModelSettingsPanelLayout='vertical'|'compact'; /** The full current settings shape, re-emitted on every `lr-change` * regardless of which child control actually triggered it. */ export interface ModelSettingsChangeDetail{model:string;inCatalog:boolean;temperature:number;}export interface LyraModelSettingsPanelEventMap{'lr-change':CustomEvent;} /** * `` — a fixed composition of `` * and `` into one agent-configuration card: pick a provider's * model, then tune its sampling temperature. Not a generic layout shell (no * slots) — it exists so a consumer doesn't have to re-wire the same two * child `lr-change` events into one combined settings object by hand every * time this pairing comes up. * * Every prop here is a plain pass-through to (or mirror of) the matching * child control's own prop of the same/similar name; see the child * components themselves for the exact semantics of `catalog`/`allowCustom` * and `temperatureMin`/`temperatureMax`/`temperatureStep`. * Array-valued catalogs are clone-owned, bounded readonly snapshots. Create and reassign a new * catalog array after changing its rows. * * The panel's own `temperature` readout mirrors the slider's *live* value — * updated on every `lr-input` (drag/key-repeat), not just the committed * `lr-change` — and is re-clamped into `[temperatureMin, temperatureMax]` * (snapped to `temperatureStep`) whenever those three properties change, so * it can never drift from what the nested `lr-slider` itself shows. * The visible temperature readout uses the effective locale and switches to bounded scientific * notation when a full decimal expansion would disturb the layout. The slider retains the exact * finite value through `aria-valuenow`. * Native `focus` and `blur` relayed by the nested model selector or slider remain local to that * child; this panel exposes only its declared consolidated `lr-change` event. * * @customElement lr-model-settings-panel * @event lr-change - Either child control changed. `detail: { model: string; inCatalog: boolean; temperature: number }` — always the full current settings, not just whatever changed. * @csspart base - The outermost wrapping container. * @csspart model-row - The row wrapping the internal `lr-model-select`. * @csspart model-select - The internal model selector. * @csspart model-label - The model selector's visible label. * @csspart temperature-row - The row wrapping the temperature label/slider/value. * @csspart temperature-label - The visible "Temperature" caption. * @csspart temperature-value - The visible current temperature readout. * @cssprop [--lr-model-settings-panel-max-inline-size=var(--lr-size-28rem)] - The card's own width * ceiling. Set a length to retune it or `none` for a full-width card. `layout="compact"` uncaps * the card by default, and reads the same name, so a length still narrows a compact card. * @status stable * @since 4.0.0 */ export declare class LyraModelSettingsPanel extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[]; /** Informational provider badge, passed straight through to the internal `lr-model-select`. */ provider:string; /** The clone-owned model list, normalized to unique nonempty first-wins ids by the internal * `lr-model-select` and by this panel's `inCatalog` event computation. Reassign a new array * after changes. */ catalog?:LyraCatalog; /** The current model id. */ model:string; /** Let the model control accept a value outside `catalog`; passed straight through. */ allowCustom:boolean; /** The current sampling temperature. */ temperature:number;temperatureMin:number;temperatureMax:number;temperatureStep:number; /** `vertical` stacks full-width rows with visible labels; `compact` runs * the same two rows side by side with a smaller temperature caption, for * toolbars/sidebars where the vertical layout's height doesn't fit. */ private _layout;get layout():ModelSettingsPanelLayout;set layout(next:ModelSettingsPanelLayout); /** Disables the panel as a unit by forwarding to both the internal * `lr-model-select` and `lr-slider` — a wrapping `
` * alone would not reach either, since a form-associated control's own * `disabled` IDL property/attribute is never mutated by fieldset cascading. */ disabled:boolean; /** Whether `model` is present in `catalog` — recomputed fresh from * scratch (like `lr-model-select`'s own `effectiveEntries`) rather than * cached from the last child event, so it's still correct when * `model` was assigned directly instead of via the child's own * `lr-change`. */ private get inCatalog();private get temperatureDomain(); /** Clamps `raw` into `[temperatureMin, temperatureMax]`, snapped to * `temperatureStep`'s grid anchored at the low end, matching the nested * slider's shared numeric semantics. */ private clampTemperature;private readonly formatTemperature;private emitChange;private onModelChange;private onTemperatureChange; /** Mirrors the slider's *live* (uncommitted) value into the panel's own * `temperature` readout -- display only, no `emitChange()` -- mirroring * native `input` (continuous) vs. `change` (committed) semantics so the * readout tracks an in-progress drag/key-repeat instead of only updating * once the interaction commits. */ private onTemperatureInput;private containNativeEvent;protected willUpdate(changed:PropertyValues):void;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-model-settings-panel':LyraModelSettingsPanel;}}