import { LitElement } from "lit"; import type { PropertyValues, TemplateResult } from "lit"; export interface FormResult { valid: boolean; values: Record; } /** * @fires submit - Fired when the form is submitted with its values in `detail`. */ export declare class XmForm extends LitElement { static styles: CSSStyleSheet[]; disabled: boolean; readonly: boolean; /** Each touched child's OWN readonly, snapshotted before the form ever sets it, so OR-propagation never clears a child's intrinsic readonly. */ private readonly _ownReadonly; connectedCallback(): void; disconnectedCallback(): void; protected updated(changed: PropertyValues): void; /** The slotted, form-associated children — discovered via the light DOM, never by querying any child's shadow root (AD-12). */ private get _fields(); /** Read one child's current value by its kind (toggle / file / value field). */ private _readValue; private _isToggle; /** A child is invalid if it carries error copy OR is required-but-empty. */ private _isInvalid; /** Public read contract: pull each child's live value at read time (children are uncontrolled — the form does not drive their renders, AD-6). */ validate(): FormResult; /** Imperative submit — same path the submit button / Enter take. */ submit(): FormResult; private _onChildSubmit; private _onKeydown; private _propagate; render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { "xm-form": XmForm; } }