import { jsxs as u, jsx as f } from "react/jsx-runtime";
import { useRef as m } from "react";
import { c as i } from "./index.CfM2L_w0.js";
import { a as x } from "./index.CfQlFjZU.js";
const C = "creator_container_Vq8pt", A = "creator_container__error_cVq10", F = "creator_container__disabled_5pTFs", b = "creator_container__readOnly_8EbI3", p = "creator_textArea_Siuq1", n = { container: C, container__error: A, container__disabled: F, container__readOnly: b, textArea: p }, y = ({ ...o }) => {
  const e = m(null);
  function t(r) {
    r.target !== e.current && e.current?.click();
  }
  function a(r) {
    r.target !== e.current && e.current?.focus();
  }
  return {
    ...o,
    textAreaRef: e,
    onContainerClick: t,
    onContainerFocus: a
  };
}, k = ({
  prefixIcon: o,
  suffixIcon: e,
  isDisabled: t,
  isError: a,
  textAreaClassName: r,
  textAreaContainerClassName: s,
  textAreaRef: _,
  onContainerClick: l,
  onContainerFocus: d,
  ...c
}) => /* @__PURE__ */ u(
  "div",
  {
    className: i(n.container, s, {
      [n.container__error]: a,
      [n.container__disabled]: t,
      [n.container__readOnly]: c.readOnly
    }),
    onClick: l,
    onFocus: d,
    tabIndex: 0,
    children: [
      o,
      /* @__PURE__ */ f(
        "textarea",
        {
          ref: _,
          className: i(n.textArea, r),
          disabled: t,
          ...c
        }
      ),
      e
    ]
  }
), N = x(k, y);
export {
  N as T
};
