import { defineComponent as n, ref as h, onMounted as m, onBeforeUnmount as d, openBlock as s, createElementBlock as c } from "vue";
import { Combo as b, DomHelper as k, BrowserHelper as g } from "@bryntum/taskboard";
const v = /* @__PURE__ */ n({
  __name: "BryntumThemeCombo",
  setup(u) {
    const a = h(null);
    let e = null;
    return m(() => {
      e = new b({
        appendTo: a.value,
        store: {
          data: [
            { id: "svalbard-light", text: "Svalbard Light" },
            { id: "svalbard-dark", text: "Svalbard Dark" },
            { id: "visby-light", text: "Visby Light" },
            { id: "visby-dark", text: "Visby Dark" },
            { id: "stockholm-light", text: "Stockholm Light" },
            { id: "stockholm-dark", text: "Stockholm Dark" },
            { id: "material3-light", text: "Material3 Light" },
            { id: "material3-dark", text: "Material3 Dark" },
            { id: "fluent2-light", text: "Fluent2 Light" },
            { id: "fluent2-dark", text: "Fluent2 Dark" },
            { id: "high-contrast-light", text: "High Contrast Light" },
            { id: "high-contrast-dark", text: "High Contrast Dark" }
          ]
        },
        label: "Theme",
        width: "16em",
        value: "svalbard-light",
        editable: !1,
        labelPosition: "before",
        ref: "themeCombo",
        listeners: {
          change({ value: r }) {
            k.setTheme(r).then((o) => {
              if (o) {
                const { theme: i, prev: l } = o;
                document.body.classList.remove(`b-theme-${l}`), document.body.classList.add(`b-theme-${i}`);
              }
            });
          }
        }
      });
      const t = g.searchParam("theme");
      t && (e.value = t);
    }), d(() => {
      e?.destroy();
    }), (t, r) => (s(), c("div", {
      ref_key: "refElement",
      ref: a
    }, null, 512));
  }
});
export {
  v as _
};
//# sourceMappingURL=C0cpdFtd.js.map
