import{P as _}from"./app-CyTk3GnO.js";import{i as f,c as h}from"./app-DckefXYL.js";import{_ as g}from"./app-DPkDcD7h.js";import{_ as y,a as C}from"./app-DntYVxd7.js";import{_ as T}from"./app-MnSDCF4P.js";import{_ as x}from"./app-COct4tsy.js";import{_ as $}from"./app-DAoM03SM.js";import{T as R}from"./app-R-vSvFIF.js";import{D as v}from"./app-Cx7ENVlu.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-DnroACXc.js";import"./app-CUqfl6on.js";import"./app-CF0qXH5Q.js";import"./app-BJhJ7lM8.js";import"./app-Dd07dUxy.js";import"./app-CYYQ_Zep.js";import"./app-Dpl5YSiv.js";import"./app-CF8nmC-F.js";import"./app-NVAx7Sc3.js";import"./app-xECxwo4T.js";import"./app-LqsmzyUT.js";import"./app-Do8DhyKT.js";import"./app-B8VsrFxM.js";import"./app-B09rlSqG.js";import"./app-CjXaciNY.js";import"./app-BbRQPmFH.js";import"./app-B4bUdtyo.js";import"./app-DFWP-E91.js";import"./app-HaDoyrq5.js";import"./app-Cmxxk_WX.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};
