import Component from '@glimmer/component';
import './amount-input.css';
export interface AmountInputArgs {
/**
* The currency displayed in the input
*/
currency?: string;
/**
* Disables the input
*/
disabled?: boolean;
/**
* A custom class applied on the input
*/
inputClass?: string;
/**
* A custom id applied on the input
*/
inputId?: string;
/**
* Specifies the minimum value for the input field
*/
min?: number;
/**
* Specifies the maximum value for the input field
*/
max?: number;
/**
* Specifies the number of decimals to use for the amount value
*/
numberOfDecimal?: number;
/**
* The placeholder displayed in the input
*/
placeholder?: string;
/**
* Specifies if the input field should be read-only
*/
readonly?: boolean;
/**
* Specifies the number intervals for the input field
*/
step?: number;
/**
* The callback function triggered when the input value is updated
*/
update: (value: string) => void;
/**
* The value of the input. It should be updated using the `update` argument
*/
value: number | string;
}
export interface AmountInputSignature {
Element: HTMLDivElement;
Args: AmountInputArgs;
}
/**
* An amount/money input component.
*
* @public
* @class AmountInput
*
* @example
*
* ```hbs
*
* ```
*/
export default class AmountInput extends Component {
/**
* The currency displayed in the input.
* Defaults to `EUR`.
*/
get currency(): string;
/**
* A custom id applied on the input.
* Defaults to `amount-input`.
*/
get inputId(): string;
/**
* Specifies the number of decimals to use for the amount value.
* Can be >= 0.
* Defaults to 2.
*/
get numberOfDecimal(): number;
/**
* The placeholder displayed in the input.
* Defaults to `0.00`.
*/
get placeholder(): string;
/**
* Specifies the number intervals for the input field.
* Can be >= 0.
* Defaults to 0.01.
*/
get step(): number;
onKeyDown(event: KeyboardEvent): boolean;
onInput(event: Event): boolean;
onPaste(event: ClipboardEvent): boolean;
onFocusOut(event: FocusEvent): boolean;
private argOrDefault;
}
//# sourceMappingURL=amount-input.d.ts.map