import{o as p,g as d,a as i,f as m,t as g,j as x,b as o,w as r,u as a,c as k,h,F as v,i as c}from"./app-BYcXwl4U.js";import{i as C,c as b}from"./app-a6cKceqE.js";import{_ as $}from"./app-BUc97JYP.js";import{L as y}from"./app-W_y7sflh.js";import{_ as u}from"./app-BqeukU67.js";import{N}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";const G={style:{"text-align":"center","margin-top":"5em"}},w=i("div",{style:{"font-size":"2em","margin-bottom":"1em"}},[i("i",{class:"pi pi-exclamation-triangle !text-4xl text-gray-400"})],-1),B={class:"comment"},R={__name:"NotFoundBox",props:["message"],setup(e){return(t,n)=>(p(),d("div",G,[w,i("p",B,[m(g(e.message)+" ",1),x(t.$slots,"default")])]))}};function T(){const{utils:e,Tea:t}=C(this);this.createGroup=function(){e.popup("/ns/domains/groups/createPopup",{callback:function(){e.successRefresh("保存成功")}})},this.updateGroup=function(n){e.popup("/ns/domains/groups/group/updatePopup?groupId="+n,{callback:function(){e.successRefresh("保存成功")}})},this.deleteGroup=function(n){let _=this;e.confirm("确定要删除此分组吗？",function(){_.$post("/ns/domains/groups/group/delete").params({groupId:n}).success(function(){e.successRefresh("删除成功")})})}}const V={key:1},F=["onClick"],I=i("i",{class:"icon expand small"},null,-1),L=["onClick"],P=["onClick"],pt={__name:"index",setup(e){const t=b(new T);return(n,_)=>(p(),d(v,null,[o(N,null,{tabs:r(()=>[o(l,{href:"/ns/domains/groups",active:!0,name:"分组列表"}),o(l,{separator:""}),o(l,{static:"",onClick:c(a(t).createGroup,["prevent"]),name:"创建分组","action-create":""},null,8,["onClick"])]),_:1}),a(t).groups.length==0?(p(),k(R,{key:0},{default:r(()=>[m("暂时还没有分组。")]),_:1})):h("",!0),a(t).groups.length>0?(p(),d("div",V,[o(y,{items:a(t).groups},{default:r(()=>[o(u,{header:"分组名称",class:"name-column"},{body:r(({data:s})=>[i("a",{href:"",onClick:c(f=>a(t).updateGroup(s.id),["prevent"])},[m(g(s.name)+" ",1),I],8,F)]),_:1}),o(u,{header:"状态",class:"fixed-status-column"},{body:r(({data:s})=>[o($,{"v-is-on":s.isOn},null,8,["v-is-on"])]),_:1}),o(u,{header:"操作",class:"two op"},{body:r(({data:s})=>[i("a",{href:"",onClick:c(f=>a(t).updateGroup(s.id),["prevent"])},"修改",8,L),m("   "),i("a",{href:"",onClick:c(f=>a(t).deleteGroup(s.id),["prevent"])},"删除",8,P)]),_:1})]),_:1},8,["items"])])):h("",!0)],64))}};export{pt as default};
