import{_ as g}from"./AdminLayout-bd13ff9d.js";import{_ as b}from"./PageHeader-8c638686.js";import{_ as v}from"./Paginate-f61b79b2.js";import{h as k}from"./moment-a9aaa855.js";import{s as w,A as x,p as s,h as m,c as i,a as n,b as t,t as e,u as o,F as C,r as y,i as A,g as $,o as c,n as B,j as L}from"./app-13978987.js";import D from"./OverviewGrid-21ea6fc2.js";import{_ as I}from"./NoDataFound-bc81d7fa.js";import"./dropdown-45d66330.js";const M={class:"container p-4 sm:p-6"},j={class:"space-y-6"},z={class:"table-responsive whitespace-nowrap rounded-primary"},E={class:"table"},F={class:"text-right"},N={key:0},S={class:"text-left"},V=["src"],O={class:"text-left"},R={class:""},T={class:"dropdown","data-placement":"bottom-start"},Y={class:"dropdown-toggle"},q={class:"dropdown-content w-40"},G={class:"dropdown-list"},H={class:"dropdown-list-item"},J={class:"dropdown-list-item"},K=["onClick"],P=$({layout:g}),nt=Object.assign(P,{__name:"Index",props:["logos","categories","total","active","inActive","buttons","segments"],setup(l){const{deleteRow:h}=w(),d=l,p=x(()=>[{value:d.total,title:s("Total"),iconClass:"bx:badge"},{value:d.active,title:s("Active"),iconClass:"bx:badge-check"},{value:d.inActive,title:s("Inactive"),iconClass:"bx:x-circle"}]);return(_,Q)=>{const r=m("Icon"),f=m("Link");return c(),i("main",M,[n(b,{title:"Brand Logos",buttons:l.buttons},null,8,["buttons"]),t("div",j,[n(D,{items:p.value,grid:"3"},null,8,["items"]),t("div",z,[t("table",E,[t("thead",null,[t("tr",null,[t("th",null,e(o(s)("Logo")),1),t("th",null,e(o(s)("Category")),1),t("th",null,e(o(s)("Status")),1),t("th",null,e(o(s)("Created At")),1),t("th",null,[t("p",F,e(o(s)("Action")),1)])])]),l.logos.total?(c(),i("tbody",N,[(c(!0),i(C,null,y(l.logos.data,a=>{var u;return c(),i("tr",{key:a.id},[t("td",S,[t("img",{src:a.preview,class:"h-12",alt:""},null,8,V)]),t("td",null,e((u=a.category)==null?void 0:u.title),1),t("td",O,[t("span",{class:B(["badge",a.status=="active"?"badge-success":"badge-danger"])},e(a.status=="active"?o(s)("Active"):o(s)("Draft")),3)]),t("td",null,e(o(k)(a.created_at).format("D-MMM-Y")),1),t("td",R,[t("div",T,[t("div",Y,[n(r,{class:"text-2xl",icon:"bx:dots-horizontal-rounded"})]),t("div",q,[t("ul",G,[t("li",H,[n(f,{href:_.route("admin.brand-logos.edit",a.id),class:"dropdown-link"},{default:L(()=>[n(r,{icon:"fe:edit"}),t("span",null,e(o(s)("Edit")),1)]),_:2},1032,["href"])]),t("li",J,[t("button",{as:"button",class:"dropdown-link",onClick:U=>o(h)(_.route("admin.brand-logos.destroy",a.id))},[n(r,{icon:"fe:trash"}),t("span",null,e(o(s)("Delete")),1)],8,K)])])])])])])}),128))])):(c(),A(I,{key:1,"for-table":"true"}))]),n(v,{links:l.logos.links},null,8,["links"])])])])}}});export{nt as default};
