var c = Object.defineProperty;
var l = (t, e, s) => e in t ? c(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
var a = (t, e, s) => (l(t, typeof e != "symbol" ? e + "" : e, s), s);
import { defineComponent as m, h as i } from "vue";
import { useNamespace as d } from "@ibiz-template/vue-util";
import { PluginStaticResource as u } from "@ibiz-template/runtime";
class p {
  constructor() {
    a(this, "component", "IndexView");
  }
}
const f = m({
  name: "WFToolbar",
  props: {
    wfLinks: {
      type: Array,
      required: !0
    }
  },
  setup(t, {
    emit: e
  }) {
    const s = d("wf-toolbar"), o = async (n, r) => {
      e("wf-link-click", n, r);
    };
    return {
      ns: s,
      handleClick: async (n, r) => {
        setTimeout(() => {
          o(n, r);
        }, 30);
      }
    };
  },
  render() {
    const t = this.wfLinks || [];
    return i("div", {
      class: `${this.ns.b()}`
    }, [t.length > 0 && t.map((e) => {
      const s = e.sequenceFlowName.startsWith("驳回") || e.sequenceFlowName.startsWith("取消");
      return i("div", {
        key: e.sequenceFlowId,
        class: [this.ns.e("item"), s ? this.ns.em("item", "reject") : ""]
      }, [i("i-button", {
        attrs: {
          title: e.sequenceFlowName
        },
        on: {
          click: (o) => this.handleClick(e, o)
        }
      }, [e.sequenceFlowName || ""])]);
    })]);
  }
}), w = new u(import.meta.url);
const y = {
  mateUrl: import.meta.url,
  install(t) {
    w.loadStyle(["/style.css"]), t.component("WfToolbar", f), ibiz.config.enableDataInfoBar = !1, ibiz.config.gridEditShowMode = "all", ibiz.register.view.register(
      "VIEW_CUSTOM_GsIndexCSS",
      new p()
    );
  }
};
export {
  y as default
};
