import { jsx as y } from "react/jsx-runtime";
import { useMemo as x } from "react";
import { c as v, s as T, a as V } from "../tools/tools.js";
const C = function(n) {
  const {
    as: i = "textarea",
    children: a,
    className: e,
    defaultValue: c,
    dropOldClass: s,
    isInvalid: t,
    isValid: r,
    style: o,
    variables: l,
    ...m
  } = n, d = x(() => {
    const f = v(
      !s && "form-control",
      r && "is-valid",
      t && "is-invalid",
      e
    ), p = T((b, u) => ({ tKey: V(u) }), l, o);
    return {
      className: f,
      style: p
    };
  }, [s, r, t, e, l, o]);
  return /* @__PURE__ */ y(
    i,
    {
      ...m,
      ...d,
      defaultValue: c ?? (typeof a == "string" || typeof a == "number" ? a : void 0)
    }
  );
};
C.displayName = "BRL.Textarea";
export {
  C as T
};
//# sourceMappingURL=textarea.js.map
