import{_ as C}from"./vU4aS4uy.js";import{_ as L}from"./DuhDFJjj.js";import{a as z}from"./Z4eZ-m2s.js";import{j as i,d as N,w as m,o,b as t,c as r,t as e,F as P,g as w,f as u,m as a,D as F,e as R,E as S}from"./Bgmy51Qv.js";import{u as U}from"./CYl1ofbh.js";import{u as V}from"./BE7GDBwC.js";import{u as j}from"./DKgjlGGV.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";const D={class:"lite-bold"},E=["onClick"],Z={__name:"index",setup(I){i(!1),i([]);const{bannerUsed:d,productSourceObj:c}=j(),{getFeatured:p,getStatus:_,getThumbImageURL:f}=V(),{listPageRef:g,editNode:b}=U();return(n,l)=>{const y=C,$=L,h=z;return o(),N(h,{ref_key:"listPageRef",ref:g,"list-api":"getBanners","delete-api":"deleteBanner","route-name":"banners",name:n.$t("admin.banner"),gate:"banner","add-button":!1,class:"banner-table"},{table:m(({list:k})=>[t("tr",D,[t("th",null,e(n.$t("admin.img")),1),t("th",null,e(n.$t("admin.type")),1),t("th",null,e(n.$t("category.slug")),1),t("th",null,e(n.$t("admin.closable")),1),t("th",null,e(n.$t("category.status")),1),t("th",null,e(n.$t("admin.sType")),1),l[0]||(l[0]=t("th",null,null,-1))]),(o(!0),r(P,null,w(k,(s,B)=>(o(),r("tr",{key:B},[t("td",null,[u($,{to:`/banners/${s.id}`},{default:m(()=>[u(y,{"lazy-src":a(f)(s.image),alt:""},null,8,["lazy-src"])]),_:2},1032,["to"])]),t("td",null,e(a(d)[s.type]),1),t("td",null,e(s.slug),1),t("td",null,e(a(p)(s.closable)),1),t("td",{class:F(["status",{active:s.status==1}])},[t("span",null,e(a(_)(s.status)),1)],2),t("td",null,e(a(c)[s.source_type].title),1),t("td",null,[n.$can("banner","edit")?(o(),r("button",{key:0,onClick:S(T=>a(b)(s),["prevent"]),class:"lite-btn"},e(n.$t("category.edit")),9,E)):R("",!0)])]))),128))]),_:1},8,["name"])}}};export{Z as default};
