import{P as _}from"./app-YXi6Hc2l.js";import{i as f,c as h}from"./app-BT68AfZ-.js";import{_ as g}from"./app-DuUYZNNT.js";import{_ as y,a as C}from"./app-BHFzVhjx.js";import{_ as T}from"./app-DokSVapq.js";import{_ as x}from"./app-CKSEN_Rg.js";import{_ as $}from"./app-5_WV6pq1.js";import{T as R}from"./app-up4gT9D9.js";import{D as v}from"./app-DNL2FXPk.js";import{r as B,o as r,c as l,w as n,b as s,a as e,u as a,g as k,D as V,f as p,t as d,F as I,h as c}from"./app-DA7OTM4Q.js";import"./app-BlCBGn5D.js";import"./app-DSiZNBrr.js";import"./app-C5ROEzFd.js";import"./app-Bnbo6OlJ.js";import"./app-Dxa5h-uG.js";import"./app-AbPAjGV5.js";import"./app-BqY8p2gl.js";import"./app-C-GI59rl.js";import"./app-BotiHebp.js";import"./app-Zes_jb7S.js";import"./app-BQJXgoGu.js";import"./app-BkWUIifj.js";import"./app-CQwVTjAx.js";import"./app-o25MbL5M.js";import"./app-a9KqBnqw.js";import"./app-KNE_24OY.js";import"./app-BMjG4tWp.js";import"./app-D29bbm9n.js";import"./app-B_5dka6q.js";function w(){f(this),this.rangeTypeCode="ipRange",this.rangeType=null,this.ranges=[],this.$delay(function(){this.changeRangeType()}),this.changeRangeType=function(){let u=this;if(this.rangeType=this.rangeTypes.$find(function(o,t){return t.code==u.rangeTypeCode}),this.$refs!=null){let o=this.$refs.routeRangesBox;o!=null&&o.updateRangeType(this.rangeTypeCode)}}}const D=e("header",null,"创建线路",-1),N=["value"],b=["value"],q=["value"],P=e("td",{class:"title"},"线路名称 *",-1),S=e("td",null,"范围类型",-1),F=e("td",null,null,-1),ce={__name:"createPopup",setup(u){const o=B(),t=h(new w,{refs:{routeRangesBox:o}});return(L,m)=>(r(),l(_,null,{default:n(()=>[D,s(T,{action:"$",onSuccess:a(t).success},{default:n(()=>[e("input",{type:"hidden",name:"clusterId",value:a(t).clusterId},null,8,N),e("input",{type:"hidden",name:"domainId",value:a(t).domainId},null,8,b),e("input",{type:"hidden",name:"userId",value:a(t).userId},null,8,q),s(v,null,{default:n(()=>[e("tbody",null,[e("tr",null,[P,e("td",null,[s(g,{name:"name",maxlength:"100",autofocus:"",class:"w-full"})])]),e("tr",null,[S,e("td",null,[s(y,{modelValue:a(t).rangeTypeCode,"onUpdate:modelValue":m[0]||(m[0]=i=>a(t).rangeTypeCode=i),onChange:a(t).changeRangeType},{default:n(()=>[(r(!0),k(I,null,V(a(t).rangeTypes,i=>(r(),l(C,{value:i.code},{default:n(()=>[p(d(i.name),1)]),_:2},1032,["value"]))),256))]),_:1},8,["modelValue","onChange"])])]),e("tr",null,[F,e("td",null,[s($,{ref_key:"routeRangesBox",ref:o},null,512)])])])]),_:1}),a(t).quotaCanCreate?(r(),l(x,{key:0})):c("",!0),a(t).quotaCanCreate?c("",!0):(r(),l(R,{key:1,error:""},{default:n(()=>[p("已添加线路个数已超出最大限额（"+d(a(t).quotaMaxCustomRoutes)+"个线路），请升级套餐后重试。",1)]),_:1}))]),_:1},8,["onSuccess"])]),_:1}))}};export{ce as default};
