import { jsx as r, jsxs as s, Fragment as v } from "react/jsx-runtime";
import { useState as N } from "react";
import x from "../Icons.js";
import { cn as e } from "../../utils/functions.js";
import { RenderIf as d } from "../../utils/components/RenderIf.js";
import { cardTitleVariants as b, cardFooterVariants as y, cardVariants as w } from "./variants.js";
import "../../clsx-7d8NmkQq.js";
import "../../index-xVF7D3FM.js";
const g = "_accordion__body_cwdh9_1", F = {
  accordion__body: g
}, m = ({ children: a, variant: o, className: c, onClick: i }) => /* @__PURE__ */ r("div", { onClick: i, className: e(b(o), c), children: a }), I = ({ letter: a, title: o }) => /* @__PURE__ */ s("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: o })
] }), T = ({ children: a, className: o, variant: c }) => /* @__PURE__ */ r("div", { className: e(y(c), o), children: a }), V = ({
  children: a,
  variant: o,
  className: c,
  titleToShow: i,
  defaultOpen: _ = !0,
  canCloseContent: n = !1,
  contentClassName: l,
  accordionClassName: p,
  ...h
}) => {
  const [t, f] = N(_), u = () => {
    n && f(!t);
  };
  return /* @__PURE__ */ s("div", { className: e(w(o), c), ...h, children: [
    /* @__PURE__ */ r(
      m,
      {
        onClick: u,
        className: e({ "_cursor-pointer": n, "_border-transparent": n && !t }),
        variant: { variant: "govco" },
        children: /* @__PURE__ */ s(v, { children: [
          i,
          /* @__PURE__ */ r(d, { condition: n, children: /* @__PURE__ */ r(x.ArrowSlim, { className: e({ "_rotate-180": t }) }) })
        ] })
      }
    ),
    /* @__PURE__ */ r("div", { className: e(F.accordion__body, p), "data-active": `${t}`, children: /* @__PURE__ */ r("div", { className: e(t ? l : ""), children: a }) })
  ] });
}, C = {
  Wrapper: V,
  Footer: T,
  Header: m,
  Tilte: I
};
export {
  V as Card,
  C as default
};
