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