'use strict';

var clsx = require('clsx');
var React = require('react');
var _common = require('./_common.js');
var contexts = require('./contexts.js');
var InputGroup = require('./InputGroup.js');
var jsxRuntime = require('react/jsx-runtime');

const Input = /*#__PURE__*/React.forwardRef(function Input({
  size = 'auto',
  shape = 'rectangle',
  className,
  ...restProps
}, reference) {
  const inputAttributes = contexts.useInputAttributes();
  const inputPaddings = InputGroup.useInputPaddings();
  return /*#__PURE__*/jsxRuntime.jsx("input", {
    ref: reference,
    className: clsx.clsx(className, _common.inputClassNameBase({
      size
    }), 'np-input', {
      'np-input--shape-rectangle': shape === 'rectangle',
      'np-input--shape-pill': shape === 'pill'
    }),
    style: inputPaddings,
    ...inputAttributes,
    ...restProps
  });
});

exports.Input = Input;
//# sourceMappingURL=Input.js.map
