import{P as _}from"./app-Doj30F-n.js";import{i as f,c as h}from"./app-a6cKceqE.js";import{_ as g}from"./app-Ufpj4Ll4.js";import{_ as y,a as C}from"./app-DxbU-QrX.js";import{_ as T}from"./app-CQ-vNlMj.js";import{_ as x}from"./app-CignoBaV.js";import{_ as $}from"./app-D11fxmfa.js";import{T as R}from"./app-CO4sV-Ic.js";import{D as v}from"./app-7GBSHA5C.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-BYcXwl4U.js";import"./app-Ceh-tphd.js";import"./app-ysQ8KbGS.js";import"./app-Cp3gmk2J.js";import"./app--MWyBMkA.js";import"./app-BG60hdvp.js";import"./app-CNARLpXE.js";import"./app-SxAW7vhf.js";import"./app-D5k1HLu9.js";import"./app-BDgR0DSb.js";import"./app-CrjU8lgK.js";import"./app-iaXXZg9Y.js";import"./app-D2Wz0BUQ.js";import"./app-D3zbrzdO.js";import"./app-DNz6g4aI.js";import"./app-DwtlHtUX.js";import"./app-BHl80pFw.js";import"./app-DY-0PadZ.js";import"./app-yt37eDzA.js";import"./app-BQ5ggxk2.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};
