import { defineComponent as x, toRef as _, resolveComponent as v, createElementBlock as C, openBlock as b, normalizeClass as i, createElementVNode as p, withDirectives as y, renderSlot as d, createVNode as l, withCtx as z, vShow as h, unref as e, withKeys as E, normalizeProps as $, guardReactiveProps as g } from "vue";
import { C as k, W as B, _ as S } from "./install-DJFUeaKV.js";
import { u as D } from "./useExpansion-BrQ40HiR.js";
const K = { class: "wt-expansion-card-body" }, N = /* @__PURE__ */ x({
  __name: "wt-expansion-card",
  props: {
    size: { default: k.MD },
    collapsed: { type: Boolean, default: !1 }
  },
  emits: ["opened", "closed"],
  setup(c, { emit: m }) {
    const n = c, u = m, { opened: s, open: w, toggle: o } = D(_(n, "collapsed"), u);
    return (a, t) => {
      const f = v("wt-icon-btn");
      return b(), C("section", {
        class: i([[`wt-expansion-card--${n.size}`], "wt-expansion-card"])
      }, [
        p("header", {
          class: i([[n.size === "sm" ? "typo-subtitle-2" : "typo-subtitle-1"], "wt-expansion-card-header"]),
          tabindex: "0"
        }, [
          d(a.$slots, "header", {}, void 0, !0)
        ], 2),
        y(l(B, null, {
          default: z(() => [
            p("article", K, [
              d(a.$slots, "body", {}, void 0, !0)
            ])
          ], void 0, !0),
          _: 3
        }, 512), [
          [h, e(s)]
        ]),
        p("footer", {
          class: "wt-expansion-card-actions",
          onClick: t[0] || (t[0] = //@ts-ignore
          (...r) => e(o) && e(o)(...r)),
          onKeypress: t[1] || (t[1] = E(
            //@ts-ignore
            (...r) => e(o) && e(o)(...r),
            ["enter"]
          ))
        }, [
          d(a.$slots, "actions", $(g({ open: e(w), opened: e(s) })), void 0, !0),
          l(f, {
            class: i([{ "wt-expansion-card-arrow--opened": e(s) }, "wt-expansion-card-arrow"]),
            icon: "arrow-down"
          }, null, 8, ["class"])
        ], 32)
      ], 2);
    };
  }
}), W = /* @__PURE__ */ S(N, [["__scopeId", "data-v-8399aa46"]]);
export {
  W as default
};
