import { n as e } from "./chunk-TYymryXo.mjs";
import { n as t, t as n } from "./selectedInfo-CT8ehCR8.mjs";
import { createBlock as r, createCommentVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, inject as c, isRef as l, normalizeStyle as u, onMounted as d, openBlock as f, reactive as p, ref as m, unref as h, watch as g, withCtx as _ } from "vue";
import { InputNumber as v, Radio as y, RadioGroup as b } from "ant-design-vue/es";
//#region src/pages/flow-create/flow-model/createComponents/flow/right-panel/components/approvalMode.vue?vue&type=script&setup=true&lang.ts
var x = /* @__PURE__ */ s({
	name: "ApprovalMode",
	__name: "approvalMode",
	setup(e) {
		let s = c("lf"), x = t(), S = n(), C = p({
			display: "flex",
			lineHeight: "40px"
		}), w = m(1), T = m(100), E = x.getElementById(S.selectId) || {};
		return d(() => {
			w.value = E.approveMethod || 1, T.value = E.approvalModePrecent || 100, s.value.setProperties(S.selectId, { approveMethod: w.value }), s.value.setProperties(S.selectId, { approvalModePrecent: T.value });
		}), g(w, (e) => {
			x.updateElement(S.selectId, { approveMethod: e }), s.value.setProperties(S.selectId, { approveMethod: e });
		}), g(T, (e) => {
			x.updateElement(S.selectId, { approvalModePrecent: e }), s.value.setProperties(S.selectId, { approvalModePrecent: e });
		}), (e, t) => {
			let n = y, s = v, c = b;
			return f(), r(c, {
				value: h(w),
				"onUpdate:value": t[1] ||= (e) => l(w) ? w.value = e : null,
				disabled: h(E).type === "normal-task-node"
			}, {
				default: _(() => [
					o(n, {
						style: u(h(C)),
						value: 4
					}, {
						default: _(() => [...t[2] ||= [a(" 按顺序依次审批 ", -1)]]),
						_: 1
					}, 8, ["style"]),
					o(n, {
						style: u(h(C)),
						value: 2
					}, {
						default: _(() => [...t[3] ||= [a(" 会签（可同时审批，至少%人必须审批通过） ", -1)]]),
						_: 1
					}, 8, ["style"]),
					h(w) === 2 ? (f(), r(s, {
						key: 0,
						value: h(T),
						"onUpdate:value": t[0] ||= (e) => l(T) ? T.value = e : null,
						size: "small",
						style: { "margin-left": "24px" },
						min: 10,
						max: 100,
						step: 10
					}, null, 8, ["value"])) : i("", !0),
					o(n, {
						style: u(h(C)),
						value: 3
					}, {
						default: _(() => [...t[4] ||= [a(" 或签（可同时审批，有一人通过即可） ", -1)]]),
						_: 1
					}, 8, ["style"]),
					o(n, {
						style: u(h(C)),
						value: 1
					}, {
						default: _(() => [...t[5] ||= [a(" 认领审批 ", -1)]]),
						_: 1
					}, 8, ["style"])
				]),
				_: 1
			}, 8, ["value", "disabled"]);
		};
	}
}), S = /* @__PURE__ */ e({ default: () => C }), C = x;
//#endregion
export { S as n, C as t };
