import { n as e } from "./chunk-TYymryXo.mjs";
import { n as t, t as n } from "./selectedInfo-CT8ehCR8.mjs";
import { t as r } from "./drawerMessage-BK_yoR6Q.mjs";
import { t as i } from "./drawerSignal-CpH0FFcP.mjs";
import { computed as a, createElementBlock as o, createElementVNode as s, createTextVNode as c, createVNode as l, defineComponent as u, openBlock as d, ref as f, unref as p, watch as m, withCtx as h } from "vue";
import { Button as g, Table as _ } from "ant-design-vue/es";
//#region src/pages/flow-create/flow-model/createComponents/flow/right-panel/components/flowMessageAndSignal.vue?vue&type=script&setup=true&lang.ts
var v = {
	"mb-10px": "",
	flex: "",
	"justify-between": "",
	"items-center": ""
}, y = {
	"my-10px": "",
	flex: "",
	"justify-between": "",
	"items-center": ""
}, b = /* @__PURE__ */ u({
	name: "ExecutionListener",
	__name: "flowMessageAndSignal",
	setup(e) {
		let u = t(), b = n(), x = a(() => u.getElementById(b.selectId) || {}), S = [
			{
				title: "序号",
				key: "index",
				customRender: (e) => `${e.index + 1}`
			},
			{
				title: "消息ID",
				dataIndex: "messageId",
				key: "messageId"
			},
			{
				title: "消息名称",
				dataIndex: "messageName",
				key: "messageName"
			}
		], C = [
			{
				title: "序号",
				key: "index",
				customRender: (e) => `${e.index + 1}`
			},
			{
				title: "信号ID",
				dataIndex: "signalId",
				key: "signalId"
			},
			{
				title: "信号名称",
				dataIndex: "signalName",
				key: "signalName"
			}
		], w = f(x.value.messageList ?? []), T = f(x.value.signalList ?? []), E = f(), D = f();
		function O() {
			E.value?.open();
		}
		function k() {
			D.value?.open();
		}
		m(() => w.value, () => {
			u.updateElement(x.value.id, { messageList: w.value });
		}, { deep: !0 }), m(() => T.value, () => {
			u.updateElement(x.value.id, { signalList: T.value });
		}, { deep: !0 });
		function A(e) {
			w.value.push(e);
		}
		function j(e) {
			T.value.push(e);
		}
		return (e, t) => {
			let n = g, a = _;
			return d(), o("div", null, [
				s("div", v, [t[1] ||= s("div", null, "消息列表", -1), l(n, {
					size: "small",
					type: "primary",
					onClick: O
				}, {
					default: h(() => [...t[0] ||= [c(" 创建新消息 ", -1)]]),
					_: 1
				})]),
				l(a, {
					size: "small",
					columns: S,
					"data-source": p(w),
					pagination: !1,
					"row-key": "key"
				}, null, 8, ["data-source"]),
				s("div", y, [t[3] ||= s("div", null, "信号列表", -1), l(n, {
					size: "small",
					type: "primary",
					onClick: k
				}, {
					default: h(() => [...t[2] ||= [c(" 创建新信号 ", -1)]]),
					_: 1
				})]),
				l(a, {
					size: "small",
					columns: C,
					"data-source": p(T),
					pagination: !1,
					"row-key": "key"
				}, null, 8, ["data-source"]),
				l(r, {
					ref_key: "drawerMessageRef",
					ref: E,
					onSubmit: A
				}, null, 512),
				l(i, {
					ref_key: "drawerSignalRef",
					ref: D,
					onSubmit: j
				}, null, 512)
			]);
		};
	}
}), x = /* @__PURE__ */ e({ default: () => S }), S = b;
//#endregion
export { x as n, S as t };
