import { JSXInterface } from '../jsx'; import { BasicElement, CSSResultGroup, TemplateResult } from '@refinitiv-ui/core'; /** * Counter is an item count badge, * support maximum display number and notation of large numbers. */ export declare class Counter extends BasicElement { /** * Element version number * @returns version number */ static get version(): string; /** * Internal value of the element. */ private _value; /** * Internal max of the element. */ private _max; /** * The value of counter as string number * @param value counter value * @default - */ set value(value: string); /** * The value of counter as string number * @returns {string} counter value */ get value(): string; /** * Set maximum counter value. * This value will be displayed with suffix `+` if count value is larger than max. * @param value counter value * @default - */ set max(value: string); /** * Set maximum counter value. * This value will be displayed with suffix `+` if count value is larger than max. * @returns {string} max value */ get max(): string; /** * Cast and validate value to string * @param value Value that is not string which may be set by app developer, e.g. number or invalid string or null or undefined * @param propName name of property that being validate * @returns string representation of the value or return empty string if value is invalid string number */ protected validateValue(value: unknown, propName?: string): string; /** * Check if passed value is a valid number * @param value Value to check * @returns {boolean} false if value is invalid */ protected isValidNumber(value: string): boolean; /** * Format display counter value * @param value value to format * @returns {string} formatted value */ protected formatValue(value: string): string; /** * A `CSSResultGroup` that will be used * to style the host, slotted children * and the internal template of the element. * @returns CSS template */ static get styles(): CSSResultGroup; /** * A `TemplateResult` that will be used * to render the updated internal template. * @return Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-counter': Counter; } } declare global { interface HTMLElementTagNameMap { 'ef-counter': Counter; } namespace JSX { interface IntrinsicElements { 'ef-counter': Partial | JSXInterface.HTMLAttributes; } } } export {};