import { jsx as r, jsxs as c, Fragment as v } from "react/jsx-runtime";
import { useState as N } from "react";
import { s as x } from "../../style.module-m7wnmRz9.js";
import g from "../Icons.js";
import { cn as o } from "../../utils/functions.js";
import { RenderIf as d } from "../../utils/components/RenderIf.js";
import { cardTitleVariants as w, cardFooterVariants as b, cardVariants as y } from "./variants.js";
import "../../clsx-7d8NmkQq.js";
import "../../index-xVF7D3FM.js";
const m = ({ children: a, variant: e, className: t, onClick: n }) => /* @__PURE__ */ r("div", { onClick: n, className: o(w(e), t), children: a }), F = ({ letter: a, title: e }) => /* @__PURE__ */ c("div", { className: " cs3__center__wrapper _gap-2 _font-secondary", children: [
  /* @__PURE__ */ r(d, { condition: !!a, children: /* @__PURE__ */ r("span", { className: "cs3__center__wrapper _h-8 _w-8 _rounded-[50px] _bg-primary _text-maximun _font-semibold _text-white", children: a }) }),
  /* @__PURE__ */ r("p", { className: "_text-common", children: e })
] }), I = ({ children: a, className: e, variant: t }) => /* @__PURE__ */ r("div", { className: o(b(t), e), children: a }), T = ({
  children: a,
  variant: e,
  className: t,
  titleToShow: n,
  defaultOpen: p = !0,
  canCloseContent: s = !1,
  contentClassName: l,
  accordionClassName: _,
  ...f
}) => {
  const [i, h] = N(p), u = () => {
    s && h(!i);
  };
  return /* @__PURE__ */ c("div", { className: o(y(e), t), ...f, children: [
    /* @__PURE__ */ r(
      m,
      {
        onClick: u,
        className: o({ "_cursor-pointer": s, "_border-transparent": s && !i }),
        variant: { variant: "govco" },
        children: /* @__PURE__ */ c(v, { children: [
          n,
          /* @__PURE__ */ r(d, { condition: s, children: /* @__PURE__ */ r(g.ArrowSlim, { className: o({ "_rotate-180": i }) }) })
        ] })
      }
    ),
    /* @__PURE__ */ r("div", { className: o(x.accordion__body, _), "data-active": `${i}`, children: /* @__PURE__ */ r("div", { className: o(i ? l : ""), children: a }) })
  ] });
}, C = {
  Wrapper: T,
  Footer: I,
  Header: m,
  Tilte: F
};
export {
  T as Card,
  C as default
};
