import { defineComponent as I, ref as m, onMounted as W, openBlock as s, createElementBlock as i, createVNode as a, unref as c, withCtx as l, Fragment as w, renderList as h, createElementVNode as k, createTextVNode as b, toDisplayString as x } from "vue";
import { Collapse as B, CollapsePanel as C, Button as D } from "ant-design-vue";
import { useRouter as F } from "vue-router";
import { W as K } from "./WorkflowFormRenderDrawer.92087c3d.js";
import { u as P, n as S, _ as N } from "./index.14fbe0a4.js";
import "./SanZhiFormRenderOA.6d13345d.js";
import "axios";
const R = { class: "publish-box" }, U = { class: "workflow-ul" }, V = /* @__PURE__ */ I({
  __name: "SanZhiWorkflowPublish",
  setup(Z) {
    const d = F();
    m([]);
    const u = m([]), f = {};
    function v(t) {
      Object.assign(f, t);
    }
    const p = [
      {
        flowId: "flow-acad0558ef344da59460dc2a36e8335c",
        id: "flow-1413f50dcc264d71840dc8b4de29ad93",
        name: "\u6D4B\u8BD5\u65B0\u7684\u6D41\u7A0B"
      }
    ];
    function y(t) {
      const { id: n, flowId: e, instanceId: r = P.getUUID() } = t, o = { flowId: e || n, instanceId: r || "" };
      console.log(o, d), S({ params: o, router: d }).then((_) => {
        const { type: g } = _;
        g === "drawer" && f.handleOpen(o);
      });
    }
    return W(() => {
    }), (t, n) => (s(), i("div", R, [
      a(c(B), {
        activeKey: u.value,
        "onUpdate:activeKey": n[0] || (n[0] = (e) => u.value = e)
      }, {
        default: l(() => [
          (s(), i(w, null, h(p, (e) => a(c(C), {
            key: e.id,
            header: e.name
          }, {
            default: l(() => [
              k("div", U, [
                (s(), i(w, null, h(p, (r, o) => k("div", {
                  class: "workflow-li",
                  key: o
                }, [
                  a(c(D), {
                    type: "primary",
                    onClick: (_) => y(r)
                  }, {
                    icon: l(() => []),
                    default: l(() => [
                      b(x(r.name) + " ", 1)
                    ]),
                    _: 2
                  }, 1032, ["onClick"])
                ])), 64))
              ])
            ]),
            _: 2
          }, 1032, ["header"])), 64))
        ]),
        _: 1
      }, 8, ["activeKey"]),
      a(K, { onRegister: v })
    ]));
  }
});
const $ = /* @__PURE__ */ N(V, [["__scopeId", "data-v-088a33c4"]]);
export {
  $ as default
};
