import { a as __rest, _ as __assign } from '../tslib.es6-20a2a300.js';
import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import { m as makeStyles } from '../makeStyles-c9a99c7a.js';
import { M as MuiInput } from '../Input-d5c36a50.js';
import '../defaultTheme-49a26576.js';
import '../clsx.m-6243b874.js';
import '../withStyles-99aeb25b.js';
import '../hoist-non-react-statics.cjs-b718ab87.js';
import '../formControlState-da4d15f8.js';
import '../FormControlContext-64eed5c2.js';
import '../capitalize-5d3e9aac.js';
import '../useForkRef-4ff8cc89.js';
import '../deprecatedPropType-0232df1e.js';
import '../refType-5cc24a92.js';

var useStyles = makeStyles(function (theme) { return ({
    root: function (props) { return ({
        fontSize: theme.inputs.fontSize[props.textSize],
        paddingRight: theme.spacing(3),
        "&.MuiInputBase-adornedEnd": {
            paddingRight: theme.spacing(0) + "px !important"
        }
    }); }
}); });
var Input = forwardRef(function (_a, ref) {
    var type = _a.type, value = _a.value, placeholder = _a.placeholder, _b = _a.textSize, textSize = _b === void 0 ? "lg" : _b, _c = _a.color, color = _c === void 0 ? "primary" : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, startAdornment = _a.startAdornment, endAdornment = _a.endAdornment, onChange = _a.onChange, onBlur = _a.onBlur, props = __rest(_a, ["type", "value", "placeholder", "textSize", "color", "disabled", "startAdornment", "endAdornment", "onChange", "onBlur"]);
    var classes = useStyles({ textSize: textSize });
    var inputBaseProps = {
        min: props.min,
        max: props.max,
        step: props.step
    };
    return (jsx(MuiInput, __assign({ value: value, color: color, classes: classes, placeholder: placeholder, startAdornment: startAdornment, endAdornment: endAdornment, inputProps: __assign({ style: { padding: 0 } }, inputBaseProps), disabled: disabled, onChange: onChange, onBlur: onBlur, inputRef: ref, type: type }, props), void 0));
});

export { Input as default };
