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-BYcXwl4U.js";import{i as b,c as R}from"./app-a6cKceqE.js";import{_ as k}from"./app-xKOIoh_n.js";import{L as y}from"./app-W_y7sflh.js";import{_ as n}from"./app-BqeukU67.js";import{N as w}from"./app-DCd54JMo.js";import{N as l}from"./app-CabATHnR.js";import"./app-CJCAnMrx.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-ysQ8KbGS.js";import"./app-BDgR0DSb.js";import"./app-Cc2zXvHs.js";import"./app-DPDEogA0.js";import"./app-aSafd0Me.js";import"./app-BHl80pFw.js";import"./app-Btbk6LWy.js";import"./app-CrkKi1Ag.js";import"./app-u5shTDG_.js";import"./app-MrAtUXr3.js";import"./app-BWSI2Z1R.js";import"./app-DxjODhok.js";import"./app-BhzV4gWo.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};
