import { clsx } from 'clsx';
import { forwardRef } from 'react';
import { inputClassNameBase } from './_common.mjs';
import { useInputAttributes } from './contexts.mjs';
import { useInputPaddings } from './InputGroup.mjs';
import { jsx } from 'react/jsx-runtime';

const Input = /*#__PURE__*/forwardRef(function Input({
  size = 'auto',
  shape = 'rectangle',
  className,
  ...restProps
}, reference) {
  const inputAttributes = useInputAttributes();
  const inputPaddings = useInputPaddings();
  return /*#__PURE__*/jsx("input", {
    ref: reference,
    className: clsx(className, inputClassNameBase({
      size
    }), 'np-input', {
      'np-input--shape-rectangle': shape === 'rectangle',
      'np-input--shape-pill': shape === 'pill'
    })
    // eslint-disable-next-line react/forbid-dom-props
    ,
    style: inputPaddings,
    ...inputAttributes,
    ...restProps
  });
});

export { Input };
//# sourceMappingURL=Input.mjs.map
