import '@das-fed/ui/packages/components/collaspe/style.css';
import { defineComponent as c, useAttrs as f, provide as u, createBlock as m, openBlock as y, unref as n, mergeProps as v, isRef as b, createSlots as C, withCtx as p, renderSlot as I, createVNode as w, normalizeStyle as K, ref as _ } from "vue";
import { withInstall as g } from "@das-fed/utils/with-install/index";
import { Collapse as h } from "ant-design-vue";
import { DasIconDown3 as k } from "@das-fed/ui/packages/icons/down-3/index";
import { useModelValue as i } from "@das-fed/utils/vue";
import "ant-design-vue/es/collapse/style/css";
const D = /* @__PURE__ */ c({
  __name: "Index",
  props: {
    width: { default: "100%" },
    bordered: { type: Boolean, default: !1 },
    activeKey: { default: "0" },
    expandIconType: { default: "triangle" }
  },
  setup(o) {
    const l = o, a = f(), e = i(l, "activeKey"), r = i(a, "collapsible");
    return u("parentCollapsible", r), (t, d) => (y(), m(n(h), v({
      class: "das-collapse",
      activeKey: n(e),
      "onUpdate:activeKey": d[0] || (d[0] = (s) => b(e) ? e.value = s : null),
      bordered: t.bordered
    }, t.$attrs, {
      style: { width: t.width }
    }), C({
      default: p(() => [
        I(t.$slots, "default", {}, void 0, !0)
      ]),
      _: 2
      /* DYNAMIC */
    }, [
      t.expandIconType === "triangle" ? {
        name: "expandIcon",
        fn: p(({ isActive: s }) => [
          w(n(k), {
            size: "medium",
            style: K({ transform: s ? "none" : "rotate(-90deg)" })
          }, null, 8, ["style"])
        ]),
        key: "0"
      } : void 0
    ]), 1040, ["activeKey", "bordered", "style"]));
  }
}), x = (o, l) => {
  const a = o.__vccOpts || o;
  for (const [e, r] of l)
    a[e] = r;
  return a;
}, B = /* @__PURE__ */ x(D, [["__scopeId", "data-v-e4a86e3a"]]), A = () => _(null), M = g(B);
export {
  M as DasCollaspe,
  A as DasCollaspeRef,
  M as default
};
