import type { PropertyValues } from 'lit'; import { LuxenFormAssociatedElement } from '../../shared/luxen-form-associated-element.js'; /** Fired when the rating value changes in edit mode. Bubbles; not composed. */ export declare class RatingChangeEvent extends Event { readonly name: string | undefined; readonly value: string; readonly checked: boolean; readonly sourceEvent: Event; constructor(detail: { name: string | undefined; value: string; checked: boolean; sourceEvent: Event; }); } interface RatingEventMap { change: RatingChangeEvent; } /** * A star rating component using CSS mask-image. * * @summary Displays a star rating, optionally interactive. * * @csspart label - The label element shown in edit mode. * * @cssproperty --icon-size - The size of each icon. Defaults to `20px`. * @cssproperty --active-color - The fill color for rated icons. Defaults to `gold`. * @cssproperty --inactive-color - The fill color for empty icons. Defaults to `#ddd`. * @cssproperty --spacing - The spacing between icons. Defaults to `0px`. * @cssproperty --icon - Custom SVG shape as a `url()`. Defaults to a 5-pointed star. * * @event change - Emitted when the rating value changes in edit mode. Bubbles. Properties: `name: string`, `value: string`, `checked: boolean`, `sourceEvent: Event`. * * @customElement l-rating */ export declare class Rating extends LuxenFormAssociatedElement { static styles: import("lit").CSSResult[]; private currentLabel; private previewedValue; accessor editMode: boolean; accessor labels: string[]; accessor value: number; accessor length: number; /** Optional callback returning a CSS `url()` string for a given position (1-based). */ getIcon?: (value: number) => string; connectedCallback(): void; formResetCallback(): void; formStateRestoreCallback(state: string, _mode: 'restore' | 'autocomplete'): void; willUpdate(changed: PropertyValues): void; private setLabelForValue; private getRatingStyle; render(): import("lit").TemplateResult<1>; private previewValue; private clearPreview; private onClick; } export interface Rating { addEventListener(type: K, listener: (this: Rating, ev: RatingEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; removeEventListener(type: K, listener: (this: Rating, ev: RatingEventMap[K]) => void, options?: boolean | EventListenerOptions): void; removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void; } export {}; //# sourceMappingURL=rating.d.ts.map