"use client";
import { jsx as e, jsxs as u } from "react/jsx-runtime";
import { cn as N } from "../../utils/cn/cn.es.js";
import s from "../../components/TextButton/textButton.module.css";
import { Icon as o } from "../Icon/Icon.es.js";
const x = ({
  size: i = "sm",
  as: r = "button",
  disabled: t = !1,
  inverted: c = !1,
  children: l,
  prefixIcon: n,
  suffixIcon: a,
  hideOn: m,
  ...d
}) => {
  const p = s[i] || "", v = c ? s.inverted : "", h = t ? s.disabled : "";
  return /* @__PURE__ */ e(
    r,
    {
      ...d,
      className: N(s.button, v, p, h),
      disabled: t,
      "data-hide-on": m,
      children: /* @__PURE__ */ u("div", { className: s.content, children: [
        n && /* @__PURE__ */ e("div", { className: s.iconWrap, children: /* @__PURE__ */ e(o, { name: n }) }),
        /* @__PURE__ */ e("div", { children: l }),
        a && /* @__PURE__ */ e("div", { className: s.iconWrap, children: /* @__PURE__ */ e(o, { name: a }) })
      ] })
    }
  );
};
export {
  x as TextButton
};
