import{_ as V}from"./DuhDFJjj.js";import{a as P}from"./Z4eZ-m2s.js";import{O as S,j as L,d as A,e as d,w as u,m as r,o as a,b as e,c as o,t,F as c,g as p,D,f as E,E as f}from"./Bgmy51Qv.js";import{u as F}from"./CYl1ofbh.js";import{u as I}from"./BE7GDBwC.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const O={class:"lite-bold"},R={class:""},U={class:"mx-w-300x"},j=["onClick"],v=["onClick"],Z={__name:"index",setup(z){const{t:l}=S(),_=L({name:{title:l("user.name")},email:{title:l("fSale.email")},username:{title:l("user.uName")},created_at:{title:l("category.date")}}),{getVerificationStatus:$,getBoolean:h}=I(),{listPageRef:k,editNode:g,deleteNode:y}=F();return(n,m)=>{const b=V,w=P;return n.$can("admin","view")?(a(),A(w,{key:0,ref_key:"listPageRef",ref:k,"list-api":"getAdmins","delete-api":"deleteAdmin","route-name":"admins-vendors",name:n.$t("user.admVendUp"),"order-options":r(_),gate:"admin"},{table:u(({list:C})=>[e("tr",O,[e("th",null,t(n.$t("user.name")),1),e("th",null,t(n.$t("user.uName")),1),e("th",null,t(n.$t("fSale.email")),1),e("th",null,t(n.$t("user.role")),1),e("th",null,t(n.$t("user.verified")),1),e("th",null,t(n.$t("title.ac")),1),e("th",null,t(n.$t("category.created")),1),m[0]||(m[0]=e("th",null," ",-1))]),(a(!0),o(c,null,p(C,(s,N)=>(a(),o("tr",{key:N,class:D({"new-data":!parseInt(s.viewed)})},[e("td",R,[E(b,{class:"link",to:`/admins-vendors/${s.id}`},{default:u(()=>[e("h5",U,t(s.name),1)]),_:2},1032,["to"])]),e("td",null,t(s.username),1),e("td",null,t(s.email),1),e("td",null,[(a(!0),o(c,null,p(s.roles,(i,B)=>(a(),o("span",{key:B},t(i.name),1))),128))]),e("td",null,[e("span",null,t(r($)(s.verified)),1)]),e("td",null,t(r(h)(s.active)),1),e("td",null,t(s.created),1),e("td",null,[n.$can("admin","edit")?(a(),o("button",{key:0,onClick:f(i=>r(g)(s),["prevent"]),class:"lite-btn"},t(n.$t("category.edit")),9,j)):d("",!0),n.$can("admin","delete")?(a(),o("button",{key:1,onClick:f(i=>r(y)(s),["prevent"]),class:"delete-btn lite-btn"},t(n.$t("category.delete")),9,v)):d("",!0)])],2))),128))]),_:1},8,["name","order-options"])):d("",!0)}}};export{Z as default};
