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-SC54XQDl.js";import{i as b,c as R}from"./app-Ba7ZqSpq.js";import{_ as k}from"./app-B218Uy2Z.js";import{L as y}from"./app-Crd12MWL.js";import{_ as n}from"./app-CWnUJ4gg.js";import{N as w}from"./app-CL60OiIv.js";import{N as l}from"./app-B2C_dtYI.js";import"./app-DHsI_tns.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-DnXuoh8P.js";import"./app-CCkWSX4Q.js";import"./app-C8HFiBxn.js";import"./app-BjSCO7rC.js";import"./app-g-bJrEAS.js";import"./app-DZaelcLs.js";import"./app-D_RBJHM6.js";import"./app-CmrRgGIA.js";import"./app-DyP4Nide.js";import"./app-D9TrJBlL.js";import"./app-_Ovp2dOH.js";import"./app-Dhl-Bw0H.js";import"./app-COidJXl1.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};
