/**
 * Copyright (c) Adaptavist, Inc.
 */
import { GenericProps } from '../../utilities';
import { BaseSyntheticEvent, ChangeEvent, ComponentPropsWithoutRef, ReactNode } from 'react';
export type IInputNumberOnChangeArgs = {
    type: 'button' | 'number' | 'search';
    name: null | string;
    value: number | string;
};
export type EventType = BaseSyntheticEvent | React.ChangeEvent<HTMLInputElement> | IInputNumberOnChangeArgs;
export type IInput = Omit<ComponentPropsWithoutRef<'input'>, 'onChange'> & GenericProps & {
    /**
     * Prop controlling if the error state should be displayed.
     *
     * If set to true, the error state will be triggered.
     * If set to false, nothing will happen.
     *
     * Default is `false`.
     */
    error?: boolean;
    /**
     * Prop controlling the icon to display at the end of the input.
     *
     * Default is `an empty string`.
     */
    inputIcon?: React.ReactNode;
    /**
     * Prop controlling the prefix of the input.
     *
     * Default is `an empty string`.
     */
    inputPrefix?: React.ReactNode;
    /**
     * Prop controlling the suffix of the input.
     *
     * Default is `an empty string`.
     */
    inputSuffix?: React.ReactNode;
    /**
     * The function to run on change of the input.
     *
     * Default is `an empty object`.
     */
    onChange?(this: void, event: BaseSyntheticEvent | ChangeEvent<HTMLInputElement> | IInputNumberOnChangeArgs): void;
    /**
     * Prop controlling the text in the prefix tab.
     *
     * Default is `an empty string`.
     */
    prefixTabTitle?: React.ReactNode;
};
export type ITextArea = React.ComponentPropsWithoutRef<'textarea'> & GenericProps & {
    /**
     * Prop controlling if the error state should be displayed.
     *
     * If set to true, the error state will be shown.
     * If set to false, nothing will happen.
     *
     * Default is `false`.
     */
    error?: boolean;
    /**
     * Prop controlling the max number of characters allowed.
     *
     * Default is `undefined`.
     */
    maxLength?: number;
};
export type IInputLabel = React.ComponentPropsWithoutRef<'label'>;
export type IAddons = IInput & GenericProps & {
    /**
     * Prop controlling if the Input is disabled.
     *
     * If set to true, the Input will be disabled.
     * If set to false, the Input will not be disabled.
     *
     * Default is `false`.
     */
    disabled?: boolean;
    /**
     * Prop controlling if the error state should be displayed.
     *
     * If set to true, an error state will be flagged.
     * If set to false, nothing will happen.
     *
     * Default is `false`.
     */
    error?: boolean;
    /**
     * Prop controlling if the input Icon is present in the input.
     *
     * If set to true, the input will render with an Icon.
     * If set to false, the input will render as normal.
     *
     * Default is `false`.
     */
    iconPresent?: boolean;
    /**
     * Prop controlling if the prefix tab is present in the input.
     *
     * If set to true, the prefix tab will be shown.
     * If set to false, the prefix tab will be hidden.
     *
     * Default is `false`.
     */
    prefixTabPresent?: boolean;
    /**
     * Prop controlling the type of input.
     *
     * Default is `search`.
     */
    type?: 'button' | 'number' | 'search';
};
export type IErrorMessageBox = GenericProps & {
    /**
     * Prop controlling the children displayed inside the error message.
     *
     * Default is `an empty object`.
     */
    children?: ReactNode;
};
