import{_ as f}from"./Paginate-BZTS8QtF.js";import{_ as w}from"./NoDataFound-BCWTwO3P.js";import{d as k,s as b,r as c,c as d,o,a as t,e as u,t as s,F as g,g as v,b as r,w as y,h as m,u as C,i as N}from"./app-Do7K7VDV.js";import{_ as x}from"./AdminLayout-DeT_GLTC.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const B={class:"table-responsive mt-4 w-full"},V={class:"table"},$={class:"!text-right"},j={key:0,class:"tbody"},I={class:"flex items-center gap-2"},L=["src"],A={class:"flex justify-end"},D={class:"dropdown","data-placement":"bottom-start"},F={class:"dropdown-toggle"},O={class:"dropdown-content w-56"},T={class:"dropdown-list"},E={class:"dropdown-list-item"},G=["onClick"],M={class:"w-full"},P=k({layout:x}),W=Object.assign(P,{__name:"Index",props:["customers"],setup(l){const{deleteRow:_}=b();return(e,R)=>{const h=c("Link"),i=c("Icon");return o(),d("div",B,[t("table",V,[t("thead",null,[t("tr",null,[t("th",null,s(e.trans("Name")),1),t("th",null,s(e.trans("Phone")),1),t("th",null,s(e.trans("Groups")),1),t("th",null,s(e.trans("Module")),1),t("th",null,s(e.trans("Owner")),1),t("th",$,s(e.trans("Action")),1)])]),l.customers.data.length?(o(),d("tbody",j,[(o(!0),d(g,null,v(l.customers.data,(n,p)=>(o(),d("tr",{key:p},[t("td",null,[t("div",I,[t("img",{src:n.picture??"https://ui-avatars.com/api/?name="+n.name,class:"h-8 w-8 rounded-full"},null,8,L),t("span",null,s(n.name),1)])]),t("td",null,s(n.uuid),1),t("td",null,s(n.groups.map(a=>a.name).join(", ")||"N/A"),1),t("td",null,s(n.module),1),t("td",null,[r(h,{href:e.route("admin.users.show",n.owner)},{default:y(()=>{var a;return[m(s((a=n.owner)==null?void 0:a.name),1)]}),_:2},1032,["href"])]),t("td",null,[t("div",A,[t("div",D,[t("div",F,[r(i,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),t("div",O,[t("ul",T,[t("li",E,[t("button",{class:"dropdown-link delete-confirm",onClick:a=>C(_)(e.route("admin.logs.customers.destroy",n.id))},[r(i,{icon:"bx:trash"}),m(" "+s(e.trans("Delete")),1)],8,G)])])])])])])]))),128))])):(o(),u(w,{key:1,forTable:!0}))]),t("div",M,[l.customers.data.length?(o(),u(f,{key:0,links:l.customers.links},null,8,["links"])):N("",!0)])])}}});export{W as default};
