import { n as e } from "./chunk-TYymryXo.mjs";
import { t } from "./dist-BWeVpZNn.mjs";
import { r as n } from "./bpMliuchengjiantingqibiaokongzhiqi-BzQz5DIR.mjs";
import { createBlock as r, createTextVNode as i, createVNode as a, defineComponent as o, isRef as s, openBlock as c, ref as l, unref as u, withCtx as d } from "vue";
import { Button as f, Drawer as p, Space as m, Table as h } from "ant-design-vue/es";
//#region src/pages/flow-create/flow-model/createComponents/flow/right-panel/components/drawer/drawerListenerTable.vue?vue&type=script&setup=true&lang.ts
var g = /* @__PURE__ */ o({
	name: "DrawerExecutionListenerTable",
	__name: "drawerListenerTable",
	emits: ["submit"],
	setup(e, { expose: o, emit: g }) {
		let _ = g, v = l(null), [y, b] = t(!1), x = [
			{
				title: "名字",
				dataIndex: "name",
				key: "name"
			},
			{
				title: "类型",
				dataIndex: "type",
				key: "type"
			},
			{
				title: "事件",
				dataIndex: "event",
				key: "event"
			},
			{
				title: "值类型",
				dataIndex: "valueType",
				key: "valueType",
				customRender: (e) => e.text === "class" ? "Java类" : e.text === "expression" ? "表达式" : e.text === "delegateExpression" ? "代理表达式" : e.text
			},
			{
				title: "值",
				dataIndex: "value",
				key: "value",
				ellipsis: !0
			}
		];
		l([
			{
				id: 122,
				name: "jtq001",
				type: "execution",
				status: 0,
				event: "start",
				valueType: "expression",
				value: "${demoSpringExpressionExecutionListener.execute(execution)}",
				createTime: 1762484926e3
			},
			{
				id: 121,
				name: "代理表达式",
				type: "execution",
				status: 0,
				event: "start",
				valueType: "delegateExpression",
				value: "${demoSpringExpressionExecutionListener.execute(execution)}",
				createTime: 176248458e4
			},
			{
				id: 120,
				name: "表达式",
				type: "execution",
				status: 0,
				event: "start",
				valueType: "expression",
				value: "${demoDelegateExpressionExecutionListener}",
				createTime: 1762484549e3
			},
			{
				id: 119,
				name: "test",
				type: "execution",
				status: 0,
				event: "start",
				valueType: "class",
				value: "cn.iocoder.yudao.module.bpm.framework.flowable.core.listener.demo.exection.DemoDelegateClassExecutionListener",
				createTime: 1762483164e3
			}
		]), l([{
			id: 123,
			name: "ka-task-listener",
			type: "task",
			status: 0,
			event: "create",
			valueType: "expression",
			value: "${demoDelegateExpressionExecutionListener}",
			createTime: 176282969e4
		}]);
		let S = l([]);
		function C(e) {
			b(!0), n({
				type: e,
				currentPage: 1,
				pageSize: 100
			}).then((e) => {
				S.value = e.data?.records ?? [];
			});
		}
		let [w, T] = t(!1);
		function E() {
			T(!0), _("submit", v.value), T(!1), b(!1);
		}
		function D() {
			b(!1);
		}
		return o({ open: C }), (e, t) => {
			let n = h, o = f, l = m, g = p;
			return c(), r(g, {
				open: u(y),
				"onUpdate:open": t[0] ||= (e) => s(y) ? y.value = e : null,
				title: "请选择监听器",
				placement: "right",
				width: 820,
				"destroy-on-close": "",
				"footer-style": { textAlign: "right" },
				onClose: D
			}, {
				footer: d(() => [a(l, null, {
					default: d(() => [a(o, { onClick: D }, {
						default: d(() => [...t[1] ||= [i(" 取消 ", -1)]]),
						_: 1
					}), a(o, {
						type: "primary",
						loading: u(w),
						onClick: E
					}, {
						default: d(() => [...t[2] ||= [i(" 提交 ", -1)]]),
						_: 1
					}, 8, ["loading"])]),
					_: 1
				})]),
				default: d(() => [a(n, {
					size: "small",
					columns: x,
					"data-source": S.value,
					pagination: !1,
					"row-key": "key",
					"row-class-name": (e) => v.value && v.value.id === e.id ? "ant-table-row-selected" : "",
					"custom-row": (e) => ({ onClick: () => {
						v.value = e;
					} })
				}, null, 8, [
					"data-source",
					"row-class-name",
					"custom-row"
				])]),
				_: 1
			}, 8, ["open"]);
		};
	}
}), _ = /* @__PURE__ */ e({ default: () => v }), v = g;
//#endregion
export { _ as n, v as t };
