import { resolveComponent as n, openBlock as o, createElementBlock as i, normalizeStyle as r, createElementVNode as p, toDisplayString as u, createBlock as c, createCommentVNode as _, withDirectives as f, renderSlot as C, vShow as g } from "vue";
import { l as h } from "./index2.js";
const y = {
  name: "CollapsesItem",
  data() {
    return {
      isCollapsesExpend: !0,
      col: 1
    };
  },
  props: {
    title: {
      type: String,
      default: ""
    },
    column: {
      type: [Number, String],
      default: 1
    }
  },
  methods: {
    getUUID() {
      const t = Math.floor(Math.random() * 1e6);
      return `${(/* @__PURE__ */ new Date()).getTime()}${t}`;
    }
  },
  mounted() {
    this.col = this.column > 4 ? 4 : this.column;
  }
}, v = { class: "s-collapses-item" }, k = ["id"];
function x(t, s, l, D, e, m) {
  const a = n("UpOutlined"), d = n("DownOutlined");
  return o(), i("div", v, [
    l.title ? (o(), i("div", {
      key: 0,
      class: "s-collapses-item-title",
      onClick: s[0] || (s[0] = (E) => e.isCollapsesExpend = !e.isCollapsesExpend),
      style: r({ borderColor: t.$theme.bgColor }),
      id: m.getUUID()
    }, [
      p("span", null, u(l.title), 1),
      e.isCollapsesExpend ? (o(), c(a, { key: 0 })) : (o(), c(d, { key: 1 }))
    ], 12, k)) : _("", !0),
    f(p("div", {
      class: "s-collapses-item-content",
      style: r({
        display: "grid",
        gridTemplateColumns: `repeat(${e.col}, 1fr)`,
        gap: "20px"
      })
    }, [
      C(t.$slots, "default", {}, void 0, !0)
    ], 4), [
      [g, e.isCollapsesExpend]
    ])
  ]);
}
const w = /* @__PURE__ */ h(y, [["render", x], ["__scopeId", "data-v-c2748316"]]);
export {
  w as default
};
