"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.baseClassName = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const rebass_1 = require("rebass");
const join_1 = tslib_1.__importDefault(require("../utils/join"));
exports.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(rebass_1.Box, { as: "input", ref: ref, ...inputProps, type: type, disabled: disabled, className: (0, join_1.default)(className, exports.baseClassName, type ? `${exports.baseClassName}--type-${type}` : '', disabled ? `${exports.baseClassName}--disabled` : '') }));
});
exports.default = Input;
