import { n as e } from "./chunk-TYymryXo.mjs";
import { t } from "./_plugin-vue_export-helper-C_T2la-V.mjs";
import { t as n } from "./selectedInfo-CT8ehCR8.mjs";
import { t as r } from "./flowProperties-vIGdsvta.mjs";
import { t as i } from "./approvalMode-DG2OjgUf.mjs";
import { t as a } from "./customConfiguration-CDv518p_.mjs";
import { t as o } from "./edgeTransfer-itAHarFq.mjs";
import { t as s } from "./executionListener-DCbq8CSj.mjs";
import { t as c } from "./expandAttribute-BAempMpJ.mjs";
import { t as l } from "./flowMessageAndSignal-BO7O15S0.mjs";
import { t as u } from "./flowNormal-DepUFHs4.mjs";
import { t as d } from "./formComponent-Bjm1Pssx.mjs";
import { t as f } from "./normal-DMIQUNci.mjs";
import { t as p } from "./other-CH6NR9uz.mjs";
import { t as m } from "./taskListener-D5kyLiBD.mjs";
import { t as h } from "./userTask-DUn7hExJ.mjs";
import { Fragment as g, computed as _, createBlock as v, createElementBlock as y, createElementVNode as b, createVNode as x, defineComponent as S, inject as C, normalizeClass as w, normalizeStyle as T, openBlock as E, ref as D, renderList as O, resolveDynamicComponent as k, watch as A, withCtx as j } from "vue";
import { Collapse as M, CollapsePanel as N } from "ant-design-vue/es";
import { DoubleLeftOutlined as P, DoubleRightOutlined as F } from "@ant-design/icons-vue";
import './right-panel.css';//#region src/pages/flow-create/flow-model/createComponents/flow/right-panel/index.vue?vue&type=script&setup=true&lang.ts
var I = { class: "right-panel-wrapper" }, L = { key: 0 }, R = { key: 1 }, z = ["aria-hidden"], B = 500, V = /* @__PURE__ */ S({
	name: "RightPanel",
	__name: "index",
	setup(e, { expose: t }) {
		let S = C("lf"), V = D(!0), H = D(null), U = n(), W = D(["1"]);
		function G() {
			V.value ? (V.value = !1, W.value = H.value && H.value.length ? H.value : ["1"], H.value = null) : (H.value = [...W.value], W.value = [], V.value = !0);
		}
		let K = {
			normal: f,
			flowNormal: u,
			formComponent: d,
			flowMessageAndSignal: l,
			executionListener: s,
			expandAttribute: c,
			other: p,
			approveMethod: i,
			taskListener: m,
			userTask: h,
			edgeTransfer: o,
			customConfiguration: a
		}, q = {
			normal: "常规",
			flowNormal: "常规",
			formComponent: "表单",
			flowMessageAndSignal: "消息与信号",
			executionListener: "执行监听器",
			expandAttribute: "扩展属性",
			other: "其他",
			approveMethod: "多人审批方式",
			taskListener: "任务监听器",
			userTask: "用户任务",
			edgeTransfer: "流转条件",
			customConfiguration: "自定义配置"
		}, J = _(() => {
			let e = U.selectType ?? "flow";
			return e === "custom-bezier-edge" && S.value.getEdgeModelById(U.selectId).sourceNode.type === "start-node" ? r[e]?.attrs.filter((e) => e !== "edgeTransfer") || [] : e && r[e]?.attrs || [];
		}), Y = _(() => J.value.map((e) => ({
			key: e,
			component: K[e],
			header: q[e] || e
		})));
		A(Y, (e) => {
			W.value = e.length ? ["1"] : [];
		}, { immediate: !0 });
		let X = _(() => ({
			width: `${V.value ? 0 : B}px`,
			transition: "width 600ms cubic-bezier(.2,.9,.2,1)",
			overflow: "hidden"
		}));
		function Z() {
			H.value = [], V.value = !1, W.value = ["1"];
		}
		return t({ openPanel: Z }), (e, t) => {
			let n = P, r = F, i = N, a = M;
			return E(), y("div", I, [b("div", {
				class: "toggle-btn",
				role: "button",
				"aria-label": "toggle-panel",
				onClick: G
			}, [V.value ? (E(), y("span", L, [x(n)])) : (E(), y("span", R, [x(r)]))]), b("div", {
				class: w(["right-panel", { collapsed: V.value }]),
				style: T(X.value)
			}, [b("div", {
				class: "panel-inner",
				"aria-hidden": V.value,
				"overflow-auto": ""
			}, [x(a, {
				"active-key": W.value,
				"onUpdate:activeKey": t[0] ||= (e) => W.value = e,
				"destroy-inactive-panel": ""
			}, {
				default: j(() => [(E(!0), y(g, null, O(Y.value, (e, t) => (E(), v(i, {
					key: Number(t) + 1,
					header: e.header
				}, {
					default: j(() => [(E(), v(k(e.component)))]),
					_: 2
				}, 1032, ["header"]))), 128))]),
				_: 1
			}, 8, ["active-key"])], 8, z)], 6)]);
		};
	}
}), H = /* @__PURE__ */ e({ default: () => U }), U = /* @__PURE__ */ t(V, [["__scopeId", "data-v-ceb2c8ec"]]);
//#endregion
export { H as n, U as t };
