import { LitElement } from 'lit'; import { LabelPosition } from '../../../shared/form-control-utils'; import { ValidationMessages } from '../../../shared/face-mixin'; export interface RatingChangeEventDetail { oldValue: number; newValue: number; } export interface RatingHoverEventDetail { phase: 'start' | 'move' | 'end'; value: number; } export type RatingChangeEvent = CustomEvent; export type RatingHoverEvent = CustomEvent; export type RatingPrecision = 'whole' | 'half'; export type RatingSize = 'sm' | 'md' | 'lg'; export type RatingVariant = '' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger' | 'monochrome'; export interface RatingProps { value?: number; max?: number; precision?: RatingPrecision; readonly?: boolean; allowClear?: boolean; variant?: RatingVariant; size?: RatingSize; name?: string; label?: string; labelPosition?: LabelPosition; labelHidden?: boolean; noLabel?: boolean; required?: boolean; invalid?: boolean; errorMessage?: string; helpText?: string; validationMessages?: ValidationMessages; onRatingChange?: (event: RatingChangeEvent) => void; onRatingHover?: (event: RatingHoverEvent) => void; } declare const AgRating_base: (new (...args: any[]) => import('../../../shared/face-mixin').FaceMixinInterface) & typeof LitElement; export declare class AgRating extends AgRating_base { private uniqueId; private _ratingId; private _labelId; private _helperId; private _errorId; value: number; max: number; precision: 'whole' | 'half'; readonly: boolean; allowClear: boolean; variant: '' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'; size: RatingSize; label: string; labelPosition: LabelPosition; labelHidden: boolean; noLabel: boolean; required: boolean; invalid: boolean; errorMessage: string; helpText: string; validationMessages: ValidationMessages | undefined; onRatingChange?: (event: RatingChangeEvent) => void; onRatingHover?: (event: RatingHoverEvent) => void; private hoverValue; private isHovering; private isPointerDown; constructor(); /** * Sync the form value to ElementInternals. * Submits the numeric rating as a string, or null when value is 0 (no rating). */ private _syncFormValue; /** * Sync validity. No inner input to delegate to, so we implement required * directly: a rating of 0 with required=true is valueMissing. */ private _syncValidity; firstUpdated(): void; updated(changedProperties: Map): void; /** * FACE lifecycle: called when the parent form is reset. * Restores rating to 0 (no selection). */ formResetCallback(): void; /** * FACE lifecycle: called on session restore or browser autofill. * Restores the rating value from the previously saved form state. * The state is a numeric string (e.g. "3" or "3.5"), or null for no rating. */ formStateRestoreCallback(state: File | string | FormData | null, _mode: 'restore' | 'autocomplete'): void; /** * Sync CustomStateSet states so :state() pseudo-classes work from external CSS. * * Must be called AFTER _syncValidity() so that :state(invalid) reads the * freshly-updated _internals.validity.valid value. * * Exposed states: * :state(readonly) — rating is read-only * :state(required) — rating is required * :state(invalid) — FACE constraint validation is failing */ private _syncStates; connectedCallback(): void; disconnectedCallback(): void; static styles: import('lit').CSSResult[]; private renderLabel; render(): import('lit').TemplateResult<1>; private renderStar; private renderStarSvg; private roundToPrecision; private getValueFromClientX; private handleClickStar; private handlePointerEnter; private handlePointerLeave; private handlePointerDown; private handlePointerMoveHost; private handlePointerMove; private handlePointerUp; private removeGlobalPointerListeners; private handleKeyDown; private commitValue; private emitHoverEvent; } export {}; //# sourceMappingURL=_Rating.d.ts.map