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