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