import { n as e } from "./chunk-TYymryXo.mjs";
import { t } from "./_plugin-vue_export-helper-C_T2la-V.mjs";
import { t as n } from "./utils-Dl74Cgor.mjs";
import { Fragment as r, createBlock as i, createElementBlock as a, createTextVNode as o, createVNode as s, defineComponent as c, openBlock as l, renderList as u, unref as d, withCtx as f } from "vue";
import { Button as p, Form as m, FormItem as h, Input as g, Select as _ } from "ant-design-vue/es";
import { DeleteOutlined as v, PlusOutlined as y } from "@ant-design/icons-vue";
import './HttpResponseSetting.css';//#region src/pages/flow-create/flow-model/createComponents/step4/components/HttpResponseSetting.vue?vue&type=script&setup=true&lang.ts
var b = /* @__PURE__ */ c({
	name: "HttpResponseSetting",
	__name: "HttpResponseSetting",
	props: {
		response: {
			type: Array,
			required: !1,
			default: () => []
		},
		bind: {
			type: String,
			required: !0
		}
	},
	setup(e) {
		let t = e, c = n();
		function b(e) {
			e.push({
				key: "",
				value: ""
			});
		}
		function x(e, t) {
			e.splice(t, 1);
		}
		return (e, n) => {
			let S = _, C = h, w = g, T = v, E = m, D = y, O = p;
			return l(), a("div", null, [(l(!0), a(r, null, u(t.response, (e, n) => (l(), i(E, {
				key: n,
				model: e,
				class: "mb-4px!",
				layout: "inline"
			}, {
				default: f(() => [
					s(C, { name: "key" }, {
						default: f(() => [s(S, {
							value: e.key,
							"onUpdate:value": (t) => e.key = t,
							class: "w-160px!",
							placeholder: "请选择表单字段",
							options: d(c),
							"field-names": {
								label: "title",
								value: "field"
							}
						}, null, 8, [
							"value",
							"onUpdate:value",
							"options"
						])]),
						_: 2
					}, 1024),
					s(C, { name: "value" }, {
						default: f(() => [s(w, {
							value: e.value,
							"onUpdate:value": (t) => e.value = t,
							class: "w-160px",
							placeholder: "请求返回字段"
						}, null, 8, ["value", "onUpdate:value"])]),
						_: 2
					}, 1024),
					s(C, null, {
						default: f(() => [s(T, {
							style: { fontSize: "18px" },
							onClick: (e) => x(t.response, n)
						}, null, 8, ["onClick"])]),
						_: 2
					}, 1024)
				]),
				_: 2
			}, 1032, ["model"]))), 128)), s(O, {
				type: "link",
				onClick: n[0] ||= (e) => b(t.response)
			}, {
				default: f(() => [s(D, { class: "mr-5px" }), n[1] ||= o("添加一行 ", -1)]),
				_: 1
			})]);
		};
	}
}), x = /* @__PURE__ */ e({ default: () => S }), S = /* @__PURE__ */ t(b, [["__scopeId", "data-v-8a5bb18b"]]);
//#endregion
export { x as n, S as t };
