import{o as d,c as y,w as a,u as o,g as _,h as p,b as l,a as e,f as s,d as m,e as r}from"./app-BYcXwl4U.js";import{P as x}from"./app-Doj30F-n.js";import{i as v,c as V}from"./app-a6cKceqE.js";import{_ as $}from"./app-CignoBaV.js";import{_ as h}from"./app-Ufpj4Ll4.js";import{_ as u}from"./app-DwtlHtUX.js";import{_ as N}from"./app-CQ-vNlMj.js";import{C as f}from"./app-iaXXZg9Y.js";import{_ as b}from"./app-uDX3twkI.js";import{_ as w}from"./app-DiDEoOb6.js";import{_ as C}from"./app-P3j8-l6V.js";import{_ as R}from"./app-8Ka8Y3eF.js";import{_ as S}from"./app-IPzzcxTQ.js";import{_ as k}from"./app-Bh5UEIeJ.js";import{D as P}from"./app-7GBSHA5C.js";import"./app-Ceh-tphd.js";import"./app-CrjU8lgK.js";import"./app-ysQ8KbGS.js";import"./app-BHl80pFw.js";import"./app-BG60hdvp.js";import"./app-D2Wz0BUQ.js";import"./app-D3zbrzdO.js";import"./app-BbPGXKj1.js";import"./app-DY-0PadZ.js";import"./app-DxbU-QrX.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-BDgR0DSb.js";import"./app-0YmIdYYs.js";function B(){v(this),this.shouldReplace=!1,this.headerName="",this.selectHeader=function(c){this.headerName=c}}const g={key:0},D={key:1},T=["value"],X=["value"],H=e("td",{class:"title"},[s("报头名称"),e("em",null,"（Name）"),s(" *")],-1),I={class:"comment"},L=e("td",null,[s("值"),e("em",null,"（Value）")],-1),U=e("p",{class:"comment"},"可以包含请求变量。",-1),q={colspan:"2"},A=e("td",null,"支持的状态码",-1),E=e("p",{class:"comment"},"不填表示支持所有的状态码。",-1),O=e("td",null,"支持的请求方法",-1),Y=e("td",null,"支持的域名",-1),j=e("td",null,"只附加不替换",-1),z=e("p",{class:"comment"},"选中后表示如果已经存在同名的报头，则只会附加在原有的报头之后，不会覆盖。",-1),F=e("td",null,"不在跳转时启用",-1),G=e("p",{class:"comment"},"选中后表示在30X跳转时不启用当前报头。",-1),J=e("td",{class:"color-border"},"启用内容替换",-1),K=e("p",{class:"comment"},"可以替换原有报头中的内容。",-1),M=e("td",{class:"color-border"},"替换内容",-1),Be={__name:"createSetPopup",setup(c){const t=V(new B);return(Q,n)=>(d(),y(x,null,{default:a(()=>[o(t).type=="request"?(d(),_("header",g,"添加自定义请求报头")):p("",!0),o(t).type=="response"?(d(),_("header",D,"添加自定义响应报头")):p("",!0),l(N,{action:"$",onSuccess:o(t).success},{default:a(()=>[e("input",{type:"hidden",name:"headerPolicyId",value:o(t).headerPolicyId},null,8,T),e("input",{type:"hidden",name:"type",value:o(t).type},null,8,X),l(P,null,{default:a(()=>[e("tbody",null,[e("tr",null,[H,e("td",null,[l(h,{type:"text",name:"name",value:"",maxlength:"200",placeholder:"类似于Server、Content-Type之类",autofocus:"",modelValue:o(t).headerName,"onUpdate:modelValue":n[0]||(n[0]=i=>o(t).headerName=i),autocomplete:"off",class:"w-full"},null,8,["modelValue"]),e("p",I,[l(b,{"v-type":o(t).type,"v-value":o(t).headerName,onSelect:o(t).selectHeader,class:"my-1"},null,8,["v-type","v-value","onSelect"]),s("请注意报头名称的大小写，如无特殊需求，报头名称的格式通常为"),l(f,null,{default:a(()=>[s("Xxx")]),_:1}),s("或者"),l(f,null,{default:a(()=>[s("Xxx-Yyy")]),_:1}),s("。")])])]),e("tr",null,[L,e("td",null,[l(h,{type:"text",name:"value",maxlength:"500",class:"w-full"}),U])]),e("tr",null,[e("td",q,[l(w,null,{default:a(()=>[s("更多选项")]),_:1})])])]),m(e("tbody",null,[m(e("tr",null,[A,e("td",null,[l(R),E])],512),[[r,o(t).type=="response"]]),e("tr",null,[O,e("td",null,[l(S)])]),e("tr",null,[Y,e("td",null,[l(C)])]),e("tr",null,[j,e("td",null,[l(u,{name:"shouldAppend"}),z])]),m(e("tr",null,[F,e("td",null,[l(u,{name:"disableRedirect"}),G])],512),[[r,o(t).type=="response"]]),e("tr",null,[J,e("td",null,[l(u,{name:"shouldReplace",modelValue:o(t).shouldReplace,"onUpdate:modelValue":n[1]||(n[1]=i=>o(t).shouldReplace=i)},null,8,["modelValue"]),K])]),m(e("tr",null,[M,e("td",null,[l(k)])],512),[[r,o(t).shouldReplace]])],512),[[r,o(t).moreOptionsVisible]])]),_:1}),l($)]),_:1},8,["onSuccess"])]),_:1}))}};export{Be as default};
