import{o as m,g as c,b as o,u as i,w as s,h as p,F as f,i as u,c as v,D as g,f as a,t as r}from"./app-DA7OTM4Q.js";import{i as b,c as R}from"./app-BT68AfZ-.js";import{_ as k}from"./app-B3ug1_yd.js";import{L as y}from"./app-CjSxNKvA.js";import{_ as n}from"./app-Dapk2SAF.js";import{N as w}from"./app-scFtFqL8.js";import{N as l}from"./app-BX4pd6U-.js";import"./app-z_TsLOhk.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-DSiZNBrr.js";import"./app-BotiHebp.js";import"./app-DUjqI3OV.js";import"./app-CnGe5nlE.js";import"./app-45ZaIHUI.js";import"./app-KNE_24OY.js";import"./app-SLkqftrw.js";import"./app-BxVwOz69.js";import"./app-WOreqTiW.js";import"./app-DREBJ-ou.js";import"./app-CWBL8eTX.js";import"./app-OC5wWJiS.js";import"./app-Bhreb6Cm.js";function T(){const{utils:_}=b(this);this.createRoute=function(){_.popup("/ns/routes/createPopup",{width:"50em",height:"40em",callback:function(){_.success("保存成功",function(){window.location="/ns/routes"})}})},this.selectedType="isp",this.categoryRoutes=[],this.selectRouteType=function(t){if(this.selectedType=t,t.startsWith("category:")){const h=parseInt(t.substring(t.indexOf(":")+1));this.categoryRoutes=this.publicRoutes.$findAll((d,e)=>e.categoryId==h)}}}const C={key:0},x={key:1},$={key:2},N={key:3},P={key:4},se={__name:"internal",setup(_){const t=R(new T);return(h,d)=>(m(),c(f,null,[o(k,{ctx:i(t)},null,8,["ctx"]),o(w,{secondary:""},{tabs:s(()=>[o(l,{onClick:d[0]||(d[0]=u(e=>i(t).selectRouteType("isp"),["prevent"])),name:"运营商",active:""}),o(l,{onClick:d[1]||(d[1]=u(e=>i(t).selectRouteType("chinaProvince"),["prevent"])),name:"中国省市"}),o(l,{onClick:d[2]||(d[2]=u(e=>i(t).selectRouteType("worldRegion"),["prevent"])),name:"全球国家地区"}),o(l,{onClick:d[3]||(d[3]=u(e=>i(t).selectRouteType("agent"),["prevent"])),name:"搜索引擎"}),i(t).publicCategories.length>0?(m(),v(l,{key:0,separator:""})):p("",!0),(m(!0),c(f,null,g(i(t).publicCategories,e=>(m(),v(l,{onClick:u(B=>i(t).selectRouteType("category:"+e.id),["prevent"]),value:"category"+e.id},{name:s(()=>[a(r(e.name),1)]),_:2},1032,["onClick","value"]))),256))]),_:1}),i(t).selectedType=="isp"?(m(),c("div",C,[o(y,{items:i(t).ispRoutes,style:{width:"30em"}},{default:s(()=>[o(n,{header:"运营商"},{body:s(({data:e})=>[a(r(e.name),1)]),_:1}),o(n,{header:"代号"},{body:s(({data:e})=>[a(r(e.code),1)]),_:1})]),_:1},8,["items"])])):p("",!0),i(t).selectedType=="chinaProvince"?(m(),c("div",x,[o(y,{items:i(t).chinaProvinceRoutes,style:{width:"30em"}},{default:s(()=>[o(n,{header:"省市"},{body:s(({data:e})=>[a(r(e.name),1)]),_:1}),o(n,{header:"代号"},{body:s(({data:e})=>[a(r(e.code),1)]),_:1})]),_:1},8,["items"])])):p("",!0),i(t).selectedType=="worldRegion"?(m(),c("div",$,[o(y,{items:i(t).worldRegionRoutes,style:{width:"30em"}},{default:s(()=>[o(n,{header:"国家/地区"},{body:s(({data:e})=>[a(r(e.name),1)]),_:1}),o(n,{header:"代号"},{body:s(({data:e})=>[a(r(e.code),1)]),_:1})]),_:1},8,["items"])])):p("",!0),i(t).selectedType=="agent"?(m(),c("div",N,[o(y,{items:i(t).agentRoutes,style:{width:"30em"}},{default:s(()=>[o(n,{header:"搜索引擎"},{body:s(({data:e})=>[a(r(e.name),1)]),_:1}),o(n,{header:"代号"},{body:s(({data:e})=>[a(r(e.code),1)]),_:1})]),_:1},8,["items"])])):p("",!0),i(t).selectedType.startsWith("category:")?(m(),c("div",P,[o(y,{items:i(t).categoryRoutes,style:{width:"30em"}},{default:s(()=>[o(n,{header:"线路名"},{body:s(({data:e})=>[a(r(e.name),1)]),_:1}),o(n,{header:"代号"},{body:s(({data:e})=>[a(r(e.code),1)]),_:1})]),_:1},8,["items"])])):p("",!0)],64))}};export{se as default};
