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-DA7OTM4Q.js";import{P as y}from"./app-YXi6Hc2l.js";import{i as C,c as V}from"./app-BT68AfZ-.js";import{_ as g}from"./app-CKSEN_Rg.js";import{_ as m}from"./app-a9KqBnqw.js";import{_ as x}from"./app-YgBBQKnZ.js";import{_ as b}from"./app-BoTNYrkm.js";import{_ as $}from"./app-DD7gr7YA.js";import{_ as R}from"./app-D2gM4iLU.js";import{_ as w}from"./app-BAkfZW7F.js";import{_ as h}from"./app-DuUYZNNT.js";import{_ as S}from"./app-DokSVapq.js";import{C as f}from"./app-BQJXgoGu.js";import{_ as k}from"./app-CdDVkWin.js";import{D as L}from"./app-DNL2FXPk.js";import"./app-BlCBGn5D.js";import"./app-Zes_jb7S.js";import"./app-KNE_24OY.js";import"./app-Dxa5h-uG.js";import"./app-BkWUIifj.js";import"./app-CQwVTjAx.js";import"./app-DEIWLCpe.js";import"./app-BMjG4tWp.js";import"./app-BHFzVhjx.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-DSiZNBrr.js";import"./app-BotiHebp.js";import"./app-BhKfnvy7.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};
