import '@das-fed/ui/packages/components/collapse-panel/style.css';
import { defineComponent as h, useAttrs as C, ref as m, inject as v, computed as _, createBlock as w, openBlock as c, unref as d, mergeProps as b, withCtx as p, renderSlot as i, createElementVNode as o, withModifiers as k, createCommentVNode as f, withDirectives as g, createElementBlock as x, createTextVNode as D, toDisplayString as P, normalizeClass as N } from "vue";
import { withInstall as $ } from "@das-fed/utils/with-install/index";
import { setThemeRule as A } from "@das-fed/web/packages/theme/index";
import { CollapsePanel as B } from "ant-design-vue";
import { vDasTooltip as E } from "@das-fed/ui/packages/components/text-tooltip/index";
import "ant-design-vue/es/collapse/style/css";
import "@das-fed/ui/packages/global/theme";
const I = { class: "das-collaspe-panel--header" }, T = { class: "das-collaspe-panel-extra-content" }, V = /* @__PURE__ */ h({
  __name: "Index",
  props: {
    header: { default: "" }
  },
  setup(l) {
    const t = C(), a = m("das-collaspe-panel--header-left"), r = v("parentCollapsible"), n = _(() => r.value || t.collapsible === "disabled"), u = (e) => {
      var s;
      ((s = e == null ? void 0 : e.target) == null ? void 0 : s.className) === a.value && (e.preventDefault(), e.stopPropagation());
    };
    return (e, s) => (c(), w(d(B), b(e.$attrs, {
      class: "das-collaspe-panel",
      showArrow: n.value ? !1 : e.$attrs.showArrow
    }), {
      header: p(() => [
        f(" 面板头内容 "),
        o("div", {
          onClick: u,
          class: "das-collaspe-panel--header-box"
        }, [
          i(e.$slots, "header", {}, () => [
            g((c(), x("div", I, [
              D(
                P(e.header),
                1
                /* TEXT */
              )
            ])), [
              [d(E)]
            ])
          ], !0),
          o(
            "div",
            {
              class: N(a.value)
            },
            null,
            2
            /* CLASS */
          )
        ])
      ]),
      extra: p(() => [
        o("div", {
          class: "das-collaspe-panel-extra-box",
          onClick: s[0] || (s[0] = k(() => {
          }, ["stop"]))
        }, [
          o("div", T, [
            f(" 自定义渲染每个面板右上角的内容 "),
            i(e.$slots, "extra", {}, void 0, !0)
          ])
        ])
      ]),
      default: p(() => [
        i(e.$slots, "default", {}, void 0, !0)
      ]),
      _: 3
      /* FORWARDED */
    }, 16, ["showArrow"]));
  }
}), y = (l, t) => {
  const a = l.__vccOpts || l;
  for (const [r, n] of t)
    a[r] = n;
  return a;
}, R = /* @__PURE__ */ y(V, [["__scopeId", "data-v-12bf1725"]]), S = {
  "--das-ui-collaspe-bgcolor": { light: "#ffffff", dark: "#000000" }
};
A(S);
const G = () => m(null), J = $(R);
export {
  J as DasCollaspePanel,
  G as DasCollaspePanelRef,
  J as default
};
