import type { CSSProperties, VNodeChild } from "vue"; import type { XySemanticClassNames, XySemanticStyles } from "../core"; export type XyStatisticValue = number | string; export interface XyStatisticFormatterInfo { decimalSeparator: string; formattedValue: string; groupSeparator: string; precision?: number; } export type XyStatisticFormatter = (value: XyStatisticValue | undefined, info: XyStatisticFormatterInfo) => number | string; export type XyStatisticSemanticDom = "content" | "loading" | "prefix" | "root" | "suffix" | "title" | "value"; export interface XyStatisticSemanticProps { animated: boolean; animationDuration: number; decimalSeparator: string; groupSeparator: string; hasPrefix: boolean; hasSuffix: boolean; hasTitle: boolean; loading: boolean; precision?: number; value?: XyStatisticValue; } export interface XyStatisticProps { animated?: boolean; animationDuration?: number; ariaLabel?: string; classNames?: XyStatisticClassNames; decimalSeparator?: string; formatter?: XyStatisticFormatter; groupSeparator?: string; loading?: boolean; precision?: number; prefix?: number | string; styles?: XyStatisticStyles; suffix?: number | string; title?: number | string; value?: XyStatisticValue; valueStyle?: CSSProperties; } export type XyStatisticClassNames = XySemanticClassNames; export type XyStatisticStyles = XySemanticStyles; export interface XyStatisticSlots { prefix?: () => VNodeChild; suffix?: () => VNodeChild; title?: () => VNodeChild; }