import * as React from 'react';
import { Box } from '../Flex';
import clsx from 'clsx';
export const baseClassName = 'ab-Input';
const Input = React.forwardRef((props, ref) => {
    const { disabled, className, ...inputProps } = props;
    let type = 'text';
    if (inputProps && inputProps.type) {
        type = inputProps.type;
    }
    if (type === 'string') {
        type = 'text';
    }
    return (React.createElement(Box, { as: "input", ref: ref, ...inputProps, type: type, disabled: disabled, className: clsx(className, baseClassName, 'twa:min-h-input', type ? `${baseClassName}--type-${type}` : '', disabled ? `${baseClassName}--disabled` : '', {
            'twa:bg-(--ab-cmp-input__background)': !disabled,
            'twa:bg-(--ab-cmp-input--disabled__background)': disabled,
        }) }));
});
export default Input;
