import{_ as p}from"./AdminLayout-bd13ff9d.js";import{_}from"./NoDataFound-bc81d7fa.js";import{_ as h}from"./PageHeader-8c638686.js";import{s as b,h as f,c as l,a as i,b as e,t,F as d,r as c,i as g,g as y,o as n,n as k,j as v,k as C,u as B}from"./app-13978987.js";import"./dropdown-45d66330.js";const N={class:"container p-4 sm:p-6"},$={class:"space-y-6"},j={class:"table-responsive whitespace-nowrap rounded-primary"},D={class:"table"},E={class:"!text-right"},L={key:0},V={class:"flex justify-end gap-3"},A=["onClick"],F=y({layout:p}),q=Object.assign(F,{__name:"Index",props:["users"],setup(o){const{deleteRow:u}=b();return(s,R)=>{const m=f("Link");return n(),l("main",N,[i(h),e("div",$,[e("div",j,[e("table",D,[e("thead",null,[e("tr",null,[e("th",null,t(s.trans("Name")),1),e("th",null,t(s.trans("Email")),1),e("th",null,t(s.trans("Status")),1),e("th",null,t(s.trans("Role")),1),e("th",E,t(s.trans("Action")),1)])]),o.users.length?(n(),l("tbody",L,[(n(!0),l(d,null,c(o.users,a=>(n(),l("tr",{key:a.id},[e("td",null,t(a.name),1),e("td",null,t(a.email),1),e("td",null,[e("span",{class:k(a.status==1?"badge badge-success":"badge badge-danger")},t(a.status==1?s.trans("Active"):s.trans("Deactive")),3)]),e("td",null,[(n(!0),l(d,null,c(a.roles,r=>(n(),l("span",{class:"badge badge-primary",key:r},t(r.name),1))),128))]),e("td",V,[i(m,{href:s.route("admin.admin.edit",a.id),class:"btn btn-primary btn-sm"},{default:v(()=>[C(t(s.trans("Edit")),1)]),_:2},1032,["href"]),e("button",{type:"button",onClick:r=>B(u)(s.route("admin.admin.destroy",a.id)),class:"btn btn-danger btn-sm"},t(s.trans("Delete")),9,A)])]))),128))])):(n(),g(_,{key:1,"for-table":!0}))])])])])}}});export{q as default};
