import { QdDisabledDates, QdDisabledTimes } from './datepicker';
import { QdTranslatable, QdTooltip } from '../../core/core.module';
import { QdFormBaseOption } from './options.interface';
export interface QdFormCheckboxesConfiguration extends QdFormConfiguration {
    /**
     * @description Defines the individual options for an additional option list,
     * for instance within an input form.
     *
     * * @minLength: 1
     */
    options?: QdFormOption[];
    /**
     * @description Adds a filter function to reduce the number of options
     *
     * * @default: false
     */
    filter?: boolean;
    /**
     * @description The align direction of the checkboxes
     *
     * * @default: 'horizontal'
     */
    align?: 'vertical' | 'horizontal';
}
/**
 * @description Configuration Model for Qd-Forms-Checkbox-Chips
 */
export interface QdFormCheckboxChipsConfiguration extends QdFormConfiguration {
    /**
     * @description Defines the individual options for an additional option list,
     * for instance within an input form.
     *
     * * @minLength: 1
     */
    options?: QdFormOption[];
}
/**
 * @description Configuration Model for Qd-Forms-Datepicker
 */
export interface QdFormDatepickerConfiguration extends QdFormConfiguration {
    /**
     * @description Defines the disabled dates. Array
     */
    disabledDates?: QdDisabledDates[];
    /**
     * @description Enables a form control validation for the disabled dates because disabled dates can
     * be typed by hand even if they cannot be selected in the calendar.
     *
     * @default false
     */
    disabledDatesValidation?: boolean | QdDisabledDatesValidation;
    /**
     * @description Enhances the date picker with a time picker
     */
    timePicker?: QdFormTimepickerConfiguration;
    /**
     * @description Defines a placeholder for the datepicker
     *
     */
    placeholder?: QdPlaceholder;
    /**
     * @description Configures whether seconds can be included in the date-time format.
     * When enabled, the date-time format `DD.MM.YYYY HH:mm[:ss]` allows optional seconds.
     * When disabled, the format restricts entries to `DD.MM.YYYY HH:mm`, disallowing seconds.
     *
     * @default false
     */
    enableSeconds?: boolean;
}
export interface QdDisabledDatesValidation {
    /**
     * @description i18n key for the disabled dates validation error message
     */
    errorKey: string;
}
export interface QdFormTimepickerConfiguration extends QdFormDropdownConfiguration {
    /**
     * @description Specifies a time interval
     * @example for 30 minute increments, the time picker lets you pick the times as following: [00:00, 00:30, 01:00, 01:30, 02:00, ...]
     *
     * * @default: 60 minutes
     */
    timeIntervalInMinutes?: number;
    /**
     * @description Adds a filter function to reduce the number of options
     *
     * * @default: true
     */
    filter?: boolean;
    /**
     * @description Defines the disabled times. Array
     */
    disabledTimes?: QdDisabledTimes[];
    /**
     * @description Enables a form control validation for the disabled times because disabled times can
     * be typed by hand even if they cannot be selected in the time dropdown.
     *
     * @default false
     */
    disabledTimesValidation?: boolean | QdDisabledTimesValidation;
}
export interface QdDisabledTimesValidation {
    /**
     * @description i18n key for the disabled times validation error message
     */
    errorKey: string;
}
/**
 * @description Configuration Model for Qd-Forms-Dropdown
 */
export interface QdFormDropdownConfiguration extends QdFormConfiguration {
    /**
     * @description Defines a placeholder for the form
     */
    placeholder?: QdPlaceholder;
    /**
     * @description Defines a placeholderPrefix for the form,
     * only enabled if placeholder is defined
     *
     */
    placeholderPrefix?: QdPlaceholderPrefix;
    /**
     * @description Defines the individual options for an additional option list,
     * for instance within an input form.
     *
     * @minLength: 1
     */
    options?: QdFormOption[];
    /**
     * @description Adds a filter function to reduce the number of options
     *
     * * @default: false
     */
    filter?: boolean;
    /**
     * @description If you provide more than one resolver for several inputs, you can connect this input
     * with a specific resolver by settings its `name` here. If you don't want this input to be connected
     * to an options resolver, set this property to `null`.
     */
    optionsResolverName?: string | null;
}
/**
 * @description Configuration Model for Qd-Forms-Input
 */
export interface QdFormInputConfiguration extends QdFormConfiguration {
    /**
     * @description Initial value of a form. Used without FormControls only.
     */
    value?: QdInputValue;
    /**
     * @description Defines a placeholder for the form
     */
    placeholder?: QdPlaceholder;
    /**
     * @description Specify an input form type
     *
     * * @default: 'text'
     */
    inputType?: QdInputType;
    /**
     * @description Specify the "inputmode" attribute of the input element
     *
     * * @default: null (attribute not set)
     */
    inputMode?: QdInputMode;
    /**
     * @description If this field is set to true, the content of the field can be deleted.
     *
     * * @default: false
     */
    clearable?: boolean;
    /**
     * @description Defines the options for an optional dropdown that may be integrated at the end of the input field.
     * If only one unit is given, just a box is displayed in place of the dropdown.
     *
     * @minLength: 1
     */
    units?: QdFormOption[];
    /**
     * @description Defines the placeholder for the units dropdown.
     */
    unitsPlaceholder?: QdPlaceholder;
    /**
     * @description Defines options that can be selected through a dropdown
     */
    options?: QdFormOption[];
    /**
     * @description Set to "true", the input field will be focused when the application is initially loaded.
     * Note: hasAutofocus can only be used once per view. No matter in which pattern it is used.
     *
     * * @default: false
     */
    hasAutofocus?: boolean;
    /**
     * @description specifies the interval between legal numbers in an <input> element.
     *
     * * @default: 1
     */
    step?: number;
    /**
     * @description If you provide more than one resolver for several inputs, you can connect this input
     * with a specific resolver by settings its `name` here. If you don't want this input to be connected
     * to an options resolver, set this property to `null`.
     */
    optionsResolverName?: string | null;
}
/**
 * @description Configuration Model for Qd-Forms-Multi-Input
 */
export interface QdFormMultiInputConfiguration extends QdFormConfiguration {
    /**
     * @description Defines the individual options for an additional option list,
     * for instance within an input form.
     *
     * @minLength: 1
     */
    options?: QdMultiInputOption[];
    /**
     * @description Defines whether the user should be allowed to enter custom text or not.
     *
     * * @default: false
     */
    disableFreetext?: boolean;
    /**
     * @description Defines the delimiters the user input will be split to chips with.
     *
     * @minLength: 1
     */
    inputSplitters?: string[];
}
/**
 * @description Configuration Model for Qd-Forms-RadioButtons
 */
export interface QdFormRadioButtonsConfiguration extends QdFormConfiguration {
    /**
     * @description Defines the individual options for an additional option list,
     * for instance within an input form.
     *
     * * @minLength: 1
     */
    options?: QdFormOption[];
    /**
     * @description Adds a filter function to reduce the number of options
     *
     * * @default: false
     */
    filter?: boolean;
    /**
     * @description The align direction of the radio buttons
     *
     * * @default: 'horizontal'
     */
    align?: 'vertical' | 'horizontal';
}
/**
 * @description Configuration Model for Qd-Forms-Switches
 */
export interface QdFormSwitchesConfiguration extends QdFormConfiguration {
    /**
     * @description Defines the individual options for an additional option list,
     * for instance within an input form.
     *
     * @minLength: 1
     */
    options?: QdSwitchOption[];
    /**
     * @description The align direction of the switches
     *
     * * @default: 'horizontal'
     */
    align?: 'vertical' | 'horizontal';
}
/**
 * @description Configuration Model for Qd-Forms-TextArea
 */
export interface QdFormTextAreaConfiguration extends QdFormConfiguration {
    /**
     * @description Initial value of a form.
     */
    value?: string | number;
    /**
     * @description Defines a placeholder for the form
     */
    placeholder?: QdPlaceholder;
    /**
     * @description Defines a placeholderPrefix for the form,
     * only enabled if placeholder is defined
     *
     */
    placeholderPrefix?: QdPlaceholderPrefix;
    /**
     * @description Defines a height of the form
     *
     * * @default: 4
     */
    rows?: number;
}
/**
 * @description Configuration Model for Qd-Forms-PinCode
 */
export interface QdFormPinCodeConfiguration extends QdFormConfiguration {
    /**
     * @description Initial value of a form.
     */
    value?: number;
    /**
     * @description If "true", only numeric inputs are allowed
     *
     * * @default: false
     */
    digitsOnly?: boolean;
    /**
     * @description Length of Pin Code Inputs
     *
     * * @default: 6
     */
    codeLength?: 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
    /**
     * @description Initializing the focus on the first field
     *
     * * @default: false
     */
    focusOnInit?: boolean;
    /**
     * @description Chars will be shown as points
     *
     * * @default: false
     */
    codeHidden?: boolean;
    /**
     * @description Specify the input type attribute to control the keyboard on mobile devices.
     * Note: When codeHidden is true, the type will always be 'password' regardless of this setting.
     *
     * * @default: 'tel'
     */
    inputType?: QdPinCodeInputType;
}
/**
 * @description Specify the input type for pin code fields.
 * Use 'tel' for numeric keyboard or 'text' for standard keyboard.
 *
 * * @default: 'tel'
 */
export type QdPinCodeInputType = 'text' | 'tel';
export interface QdRichtextConfig extends QdFormConfiguration {
    /**
     * @description Defines a placeholder for the richtext input
     */
    placeholder?: QdPlaceholder;
}
/**
 * @description Configuration Model for Qd-Forms-FileUpload
 */
export interface QdFormFileUploadConfiguration extends QdFormConfiguration {
    /**
     * @description Defines a placeholder or label for the file upload field
     */
    placeholder?: QdPlaceholder;
}
export interface QdFormConfiguration {
    /**
     * @description Defines a label for the form
     */
    label?: QdFormLabel;
    /**
     * @description Defines a hint for the form
     */
    hint?: QdFormHint;
    /**
     * @description Disables the form. If you're using a QdFormControl or an Angular FormControl, make sure it's set to disabled there too,
     * because Angular FormControls have their own `disabled` property that takes priority over the config.
     *
     * @default: false
     *
     * ```ts
     * form = new QdFormGroup({
     *   input: new QdFormControl({ value: 'My Initial Value', disabled: true })
     * });
     * ```
     */
    disabled?: boolean;
    /**
     * @description Sets the form to "readonly"
     *
     * * @default: false
     */
    readonly?: boolean;
    /**
     * @description Sets the form to "viewonly"
     *
     * * @default: false
     */
    viewonly?: boolean;
    /**
     * @description Makes the "Hint" active to trigger an event
     *
     * * @default: false
     */
    hintAction?: boolean;
    /**
     * @description Fires event in "readonly" state
     *
     * * @default: false
     */
    readonlyAction?: boolean;
    /**
     * @description Fires event in "viewonly" state
     *
     * * @default: false
     */
    viewonlyAction?: boolean;
    /**
     * @description Tooltip configuration for the form field.
     */
    tooltip?: QdTooltip;
}
export type QdLabeli18n = string;
export interface QdFormLabel {
    /**
     * @description Defines the translation key
     */
    i18n: QdLabeli18n;
    /**
     * @description Disables this label
     *
     * * @default: false
     */
    disabled?: boolean;
}
export type QdHinti18n = string;
export interface QdFormHint {
    /**
     * @description Defines the translation key
     */
    i18n: QdHinti18n;
    /**
     * @description Disables this hint
     *
     * * @default: false
     */
    disabled?: boolean;
}
/**
 * @description Defines the value of an input field
 */
export type QdInputValue = string | number;
/**
 * @description Defines the value and the unit of an input field
 */
export interface QdInputValueWithUnit {
    /**
     * @description The actual input value.
     */
    value?: QdInputValue;
    /**
     * @description Unit associated with the value (e.g., 'kg', 'cm').
     */
    unit?: string;
}
/**
 * @description Specify an input form type
 *
 * * @default: 'text'
 */
export type QdInputType = 'text' | 'email' | 'password' | 'number' | 'tel';
/**
 * @description Specify the "inputmode" attribute of the input element
 *
 * * @default: null (attribute not set)
 */
export type QdInputMode = null | 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
export interface QdPlaceholder {
    /**
     * @description Defines the translation key
     */
    i18n: string;
    /**
     * @description Disables this placeholder
     *
     * * @default: false
     */
    disabled?: boolean;
}
export interface QdPlaceholderPrefix {
    /**
     * @description Defines the translation key
     *
     * * @default: 'i18n.qd.form.placeholder.prefix'
     */
    i18n: string;
    /**
     * @description Disables this placeholder prefix
     *
     * * @default: false
     */
    disabled?: boolean;
}
export interface QdFormOption extends QdFormBaseOption {
    /**
     * @description Sets this option to "active"
     *
     * * @default: false
     */
    active?: boolean;
}
export interface QdSwitchOption extends QdFormOption {
    /**
     * @description The position of label related to the toggler
     *
     * * @default:  'right'
     */
    labelPosition?: 'left' | 'right';
}
export interface QdMultiInputOption extends QdFormOption, QdTranslatable {
}
/**
 * @description The pincode component receives numeric values as strings as values.
 *
 * * @default:  ''
 */
export type QdPinCodeValue = '' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9';
//# sourceMappingURL=forms.interface.d.ts.map