import { defineComponent as u, reactive as b, resolveComponent as d, openBlock as h, createBlock as w, withCtx as p, createElementVNode as _, createVNode as m } from "vue";
import k from "./SanZhiFormRenderOA.6d13345d.js";
import { _ as g } from "./index.14fbe0a4.js";
const I = u({
  name: "WorkflowFormRenderModal",
  components: { SanZhiFormRenderOA: k },
  props: {},
  emits: ["update:open", "handleOk", "register"],
  setup(e, { emit: s }) {
    const n = b({
      open: !1,
      business: {},
      workflow: {},
      formConfig: {}
    });
    function t(o) {
      const { flowId: r, taskId: i, announcementId: a, officialRegisterId: c } = o;
      n.business = { flowId: r, taskId: i, announcementId: a, officialRegisterId: c }, n.business.key = new Date().getTime(), n.open = !0;
    }
    function f(o) {
      n.workflow = o, n.formConfig = o.form || {};
    }
    function l() {
    }
    return s("register", { handleOpen: t }), { handleOpen: t, handleInfo: f, handleBtn: l, state: n };
  }
}), v = { class: "actions-box" };
function C(e, s, n, t, f, l) {
  const o = d("SanZhiWorkflowActions"), r = d("SanZhiFormRenderOA"), i = d("a-drawer");
  return h(), w(i, {
    width: "100%",
    bodyStyle: { padding: "0" },
    visible: e.state.open,
    "onUpdate:visible": s[0] || (s[0] = (a) => e.state.open = a),
    title: e.state.formConfig.name
  }, {
    extra: p(() => [
      _("div", v, [
        m(o, {
          business: e.state.business
        }, null, 8, ["business"])
      ])
    ]),
    default: p(() => [
      m(r, {
        business: e.state.business,
        hasHeader: !1,
        onHandleInfo: e.handleInfo
      }, null, 8, ["business", "onHandleInfo"])
    ]),
    _: 1
  }, 8, ["visible", "title"]);
}
const O = /* @__PURE__ */ g(I, [["render", C]]);
export {
  O as W
};
