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