"use client";
import { jsx as i } from "react/jsx-runtime";
import { i as C } from "./input-DCzpefuq.js";
import { c as b } from "./cn-Bhsu1vx2.js";
import * as I from "react";
import { useCallback as y } from "react";
import { F as N } from "./field-B8xISAuX.js";
const c = I.forwardRef(
  (l, m) => {
    const {
      className: p,
      onValueChange: r,
      size: u = "base",
      variant: f = "default",
      onChange: e,
      label: t,
      labelTooltip: d,
      description: h,
      error: a,
      ...o
    } = l, { required: g } = o, x = y(
      (n) => {
        e?.(n), r?.(n.target.value);
      },
      [e, r]
    ), s = /* @__PURE__ */ i(
      "textarea",
      {
        ref: m,
        className: b(
          C({ size: u, variant: f, focusIndicator: !0 }),
          "h-auto py-2",
          // Input variant always come with size, but it does not apply for textarea
          p
        ),
        onChange: x,
        ...o
      }
    );
    return t ? /* @__PURE__ */ i(
      N,
      {
        label: t,
        required: g,
        labelTooltip: d,
        description: h,
        error: a ? typeof a == "string" ? { message: a, match: !0 } : a : void 0,
        children: s
      }
    ) : s;
  }
);
c.displayName = "InputArea";
const j = c;
export {
  c as I,
  j as T
};
//# sourceMappingURL=input-area-DCaAN9nG.js.map
