import{_ as x}from"./AdminLayout-bd13ff9d.js";import{_ as w}from"./Paginate-f61b79b2.js";import{_ as B}from"./NoDataFound-bc81d7fa.js";import{_ as $}from"./PageHeader-8c638686.js";import N from"./OverviewGrid-21ea6fc2.js";import{s as D,p as o,h as f,c as r,a,b as t,t as e,u as n,F as L,r as T,i as V,g as I,o as l,j,k as A,e as E}from"./app-13978987.js";import{_ as F}from"./FilterDropdown-9268f1dc.js";import"./dropdown-45d66330.js";import"./SpinnerBtn-899a94c2.js";const O={class:"container flex-grow p-4 sm:p-6"},z={class:"space-y-4"},R={class:"table-responsive whitespace-nowrap rounded-primary"},S={class:"table"},U={class:"text-right"},q={key:0},G=["src"],H={key:0,class:"flex items-center gap-3"},J=["src"],K={class:"dropdown","data-placement":"bottom-start"},M={class:"dropdown-toggle"},P={class:"dropdown-content w-40"},Q={class:"dropdown-list"},W={class:"dropdown-list-item"},X=["onClick"],Y=I({layout:x}),dt=Object.assign(Y,{__name:"Index",props:["brands","totalBrandCount","todaysBrandCount","lastThirtyDaysBrandCount"],setup(i){const c=i,{deleteRow:y,textExcerpt:Z,uiAvatar:g}=D(),k=[{value:c.totalBrandCount,title:o("Total"),iconClass:"bx:bar-chart"},{value:c.todaysBrandCount,title:o("Today"),iconClass:"bx:calendar"},{value:c.lastThirtyDaysBrandCount,title:o("Last 30 Days"),iconClass:"bx:calendar"}],v=[{label:"Name",value:"name"}];return(u,tt)=>{const C=f("Link"),_=f("Icon");return l(),r("main",O,[a($),t("div",z,[a(N,{items:k,grid:"3"}),a(F,{options:v}),t("div",R,[t("table",S,[t("thead",null,[t("tr",null,[t("th",null,e(n(o)("Logo")),1),t("th",null,e(n(o)("Brand Name")),1),t("th",null,e(n(o)("Brand User")),1),t("th",null,[t("p",U,e(n(o)("Action")),1)])])]),i.brands.total?(l(),r("tbody",q,[(l(!0),r(L,null,T(i.brands.data,(s,b)=>{var m,p,h;return l(),r("tr",{key:b},[t("td",null,[t("img",{src:s.logo,class:"h-12 rounded-lg",alt:"logo"},null,8,G)]),t("td",null,e(s.name),1),t("td",null,[s.user?(l(),r("div",H,[t("img",{class:"h-10 rounded-full",src:n(g)((m=s.user)==null?void 0:m.name,(p=s.user)==null?void 0:p.avatar)},null,8,J),t("div",null,[a(C,{href:u.route("admin.users.show",s.user.id),class:"font-bold"},{default:j(()=>{var d;return[A(e((d=s.user)==null?void 0:d.name),1)]}),_:2},1032,["href"]),t("p",null,e((h=s.user)==null?void 0:h.email),1)])])):E("",!0)]),t("td",null,[t("div",K,[t("div",M,[a(_,{class:"text-2xl",icon:"bx:dots-horizontal-rounded"})]),t("div",P,[t("ul",Q,[t("li",W,[t("button",{onClick:d=>n(y)(u.route("admin.user-logs.brands.destroy",s)),class:"dropdown-link"},[a(_,{icon:"fe:trash"}),t("span",null,e(n(o)("Delete")),1)],8,X)])])])])])])}),128))])):(l(),V(B,{key:1,"for-table":!0}))]),a(w,{links:i.brands.links},null,8,["links"])])])])}}});export{dt as default};
