import { LitElement, type PropertyValues } from 'lit'; import type { FeedbackSentiment } from '../../types/index.js'; import './define-action-feedback.js'; /** * @tag loquix-feedback-form * @summary Higher-order feedback flow: thumbs up/down + reason chips + optional comment. * * Composes two `loquix-action-feedback` buttons into a single flow, then opens a * reasons + comment card once a sentiment is picked. The inner `loquix-feedback` * events are intercepted (stopPropagation) so consumers only ever see the * higher-level `loquix-feedback-submit`. * * The reason payload carries a stable `FeedbackReason` ID, never the localised * chip label. * * @csspart buttons - The thumbs row. * @csspart form - The reasons + comment card shown after a sentiment is picked. * @csspart reasons - The radiogroup of reason chips. * @csspart chip - A single reason chip. * @csspart textarea - The comment textarea. * @csspart submit - Submit button. * @csspart cancel - Cancel button. * @csspart thanks - Thanks message shown after submit. * * @fires loquix-feedback-submit - When the user clicks Send. * Detail: `{ sentiment, reason?, comment? }`. * * @cssprop [--loquix-ai-color] - Active chip background and primary button colour. */ export declare class LoquixFeedbackForm extends LitElement { static styles: import("lit").CSSResult[]; private _localize; /** Whether to open the reasons + comment card after a sentiment is picked. */ allowReason: boolean; /** Currently selected sentiment, or null if neither is picked. */ value: FeedbackSentiment | null; /** When true, requires a non-empty comment before Send is enabled on negative feedback. */ requireCommentOnDown: boolean; private _reason; private _comment; private _submitted; /** * Returns the current value if it's a valid `FeedbackSentiment`, else `null`. * Guards against `value` being set from an attribute or external mutation * to something outside the type union. */ private _validValue; /** * When `value` changes — by user click, external prop assignment, or attribute * change — reset the draft state. This keeps controlled usage clean: a parent * that sets `value=null` after the user submits will see the thanks state * cleared automatically; flipping sentiment externally doesn't carry stale * chip / comment selections from the previous sentiment's chip set. * * Done in `willUpdate` (not `updated`) to fold the resets into the same * render cycle — avoids a second update being scheduled from within * `updated`. */ protected willUpdate(changed: PropertyValues): void; /** * Intercepts the inner `loquix-feedback` and reads the post-toggle `.active` * state from the child to update parent state. Stops propagation so the * inner event never escapes the form — only `loquix-feedback-submit` is the * public surface. */ private _onChildFeedback; private _onChipClick; private _onCommentInput; private _isSendDisabled; private _onSend; private _onCancel; protected render(): import("lit").TemplateResult<1>; } //# sourceMappingURL=loquix-feedback-form.d.ts.map