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-SC54XQDl.js";import{P as y}from"./app-BGgVpkqZ.js";import{i as C,c as V}from"./app-Ba7ZqSpq.js";import{_ as g}from"./app-DWUwCFNm.js";import{_ as m}from"./app-FlPLZh9D.js";import{_ as x}from"./app-Dm_s2Shu.js";import{_ as b}from"./app-BvNab7uU.js";import{_ as $}from"./app-CFVaWhUS.js";import{_ as R}from"./app-huVLEujn.js";import{_ as w}from"./app-BJA9o9q8.js";import{_ as h}from"./app-CVQkwzlf.js";import{_ as S}from"./app-DFulsyXy.js";import{C as f}from"./app-Ciy_QwIW.js";import{_ as k}from"./app-B2dMDOgF.js";import{D as L}from"./app-ZeVDYyDS.js";import"./app-yUrwy8EY.js";import"./app-CNHjdV6U.js";import"./app-DZaelcLs.js";import"./app-PPG0ZS4d.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.js";import"./app-BxWqoSpr.js";import"./app-T1ysvErZ.js";import"./app-PrSv7rSt.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-DnXuoh8P.js";import"./app-CCkWSX4Q.js";import"./app-Br6sp3du.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};
