"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }



var _chunkAEJ7VTL4cjs = require('./chunk-AEJ7VTL4.cjs');

// src/components/TextArea.tsx
var _styled = require('@emotion/styled'); var _styled2 = _interopRequireDefault(_styled);
var _react = require('react');
var _jsxruntime = require('@emotion/react/jsx-runtime');
var defaultProps = {
  disabled: false
};
function TextArea({
  value,
  onChange,
  label,
  error,
  placeholder,
  id,
  hint,
  disabled = defaultProps.disabled,
  minHeight,
  readOnly = false
}) {
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
    label && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAEJ7VTL4cjs.Label, { children: label }),
    /* @__PURE__ */ _jsxruntime.jsx.call(void 0, 
      StyledTextArea,
      {
        id,
        value,
        minHeight,
        onChange: (event) => {
          onChange(event.target.value, event);
        },
        disabled,
        hasError: Boolean(error),
        placeholder,
        readOnly
      }
    ),
    /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkAEJ7VTL4cjs.InputSubtext, { text: error || hint })
  ] });
}
var StyledTextArea = _styled2.default.textarea`
  ${_chunkAEJ7VTL4cjs.textInputStyle}
  resize: none;
  min-height: ${({ minHeight }) => typeof minHeight === "number" ? `${minHeight}px` : "initial"};
`;



exports.TextArea = TextArea;
