import{P as _}from"./app-BGgVpkqZ.js";import{i as f,c as h}from"./app-Ba7ZqSpq.js";import{_ as g}from"./app-CVQkwzlf.js";import{_ as y,a as C}from"./app-PrSv7rSt.js";import{_ as T}from"./app-DFulsyXy.js";import{_ as x}from"./app-DWUwCFNm.js";import{_ as $}from"./app-qrgC0b5H.js";import{T as R}from"./app-C28obFWS.js";import{D as v}from"./app-ZeVDYyDS.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-SC54XQDl.js";import"./app-yUrwy8EY.js";import"./app-DnXuoh8P.js";import"./app-BZGObKCm.js";import"./app-BPIIxVwk.js";import"./app-PPG0ZS4d.js";import"./app-DgoEZtNT.js";import"./app-Ch8j4za4.js";import"./app-Dw0jKdCD.js";import"./app-CCkWSX4Q.js";import"./app-CNHjdV6U.js";import"./app-Ciy_QwIW.js";import"./app-DoVkxbmA.js";import"./app-C2mBgI5Z.js";import"./app-DPYq7hh-.js";import"./app-FlPLZh9D.js";import"./app-DZaelcLs.js";import"./app-T1ysvErZ.js";import"./app-CkINxBL9.js";import"./app--Lj8zATS.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};
