import{_ as b}from"./DuhDFJjj.js";import{a as C}from"./Z4eZ-m2s.js";import{O as N,j as R,d as w,w as d,m as a,o as n,b as e,c as r,t as o,F as B,g as P,f as L,e as c,E as m}from"./Bgmy51Qv.js";import{u as V}from"./CYl1ofbh.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";const x={class:"lite-bold"},E={class:""},F={class:"mx-w-300x"},O=["onClick"],j=["onClick"],J={__name:"index",setup(v){const{t:l}=N(),p=R({name:{title:l("user.name")},created_at:{title:l("category.date")}}),{listPageRef:_,editNode:u,deleteNode:f}=V();return(t,i)=>{const k=b,g=C;return n(),w(g,{ref_key:"listPageRef",ref:_,"list-api":"getRoles","delete-api":"deleteRole","route-name":"roles-permissions",name:t.$t("profile.rp"),"empty-store-variable":"allRoles","order-options":a(p),gate:"role"},{table:d(({list:h})=>[e("tr",x,[e("th",null,o(t.$t("user.name")),1),e("th",null,o(t.$t("category.created")),1),i[0]||(i[0]=e("th",null," ",-1))]),(n(!0),r(B,null,P(h,(s,y)=>(n(),r("tr",{key:y},[e("td",E,[L(k,{class:"link",to:`/roles-permissions/${s.id}`},{default:d(()=>[e("h5",F,o(s.name),1)]),_:2},1032,["to"])]),e("td",null,o(s.created),1),e("td",null,[t.$can("role","edit")?(n(),r("button",{key:0,onClick:m($=>a(u)(s),["prevent"]),class:"lite-btn"},o(t.$t("category.edit")),9,O)):c("",!0),t.$can("role","delete")?(n(),r("button",{key:1,onClick:m($=>a(f)(s),["prevent"]),class:"delete-btn lite-btn"},o(t.$t("category.delete")),9,j)):c("",!0)])]))),128))]),_:1},8,["name","order-options"])}}};export{J as default};
