import { FormControl } from '@angular/forms'; import { Color } from '@ionic/core'; import { ComponentState } from '../../types'; export type NumberPickerVariant = 'wheel' | 'field-stepper' | 'compact-stepper'; export interface NumberPickerMetadata { /** Associated numeric form control. */ control: FormControl; /** Unique token for consumers/tests. */ token?: string; /** Display label. */ label?: string; /** Optional helper text rendered below the control. */ hint?: string; /** Minimum allowed value. Default: 0. */ min?: number; /** Maximum allowed value. */ max?: number; /** Increment/decrement step. Default: 1. */ step?: number; /** Unit label shown next to the value, such as kg, cm, users. */ unitLabel?: string; /** Visual variant. Default: field-stepper. */ variant?: NumberPickerVariant; /** Ionic color used by the selected/primary value. Default: primary. */ color?: Color | string; /** Whether manual typing is allowed for field variants. Default: true. */ editable?: boolean; /** Input mode for editable variants. Default: numeric. */ inputMode?: 'numeric' | 'decimal'; /** Number of decimals to keep when input/step is decimal. Default: 0. */ precision?: number; /** Component state. */ state?: ComponentState; /** Custom class passed to the root. */ cssClass?: string; /** Decrement button aria-label. */ decrementLabel?: string; /** Increment button aria-label. */ incrementLabel?: string; } export interface NumberPickerChangeEvent { value: number; previousValue: number; atMin: boolean; atMax: boolean; }