import{_ as w}from"./DuhDFJjj.js";import{a as D}from"./Z4eZ-m2s.js";import{O as N,j as x,d as F,w as m,m as o,o as a,b as t,c as i,t as s,F as P,g as V,G as R,H as E,K as H,f as I,D as M,e as p,E as _}from"./Bgmy51Qv.js";import{u as O}from"./CYl1ofbh.js";import{u as T}from"./BE7GDBwC.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";import"./DKgjlGGV.js";const U={class:"lite-bold"},j=["value"],v={class:"mx-w-300x"},z=["onClick"],A=["onClick"],lt={__name:"index",setup(G){const{t:r}=N(),f=x({created_at:{title:r("category.date")},title:{title:r("index.title")},status:{title:r("category.status")}}),{getStatus:h}=T(),{cbList:d,deleteBulk:k,listPageRef:g,setItemList:y,checkAll:c,editNode:$,deleteNode:b}=O();return(l,n)=>{const C=w,B=D;return a(),F(B,{ref_key:"listPageRef",ref:g,"list-api":"getFlashSales","delete-api":"deleteFlashSale","route-name":"flash-sales",name:l.$t("fSale.fSale"),"order-options":o(f),gate:"flash_sale",onDeleteBulk:o(k),onList:o(y)},{table:m(({list:L})=>[t("tr",U,[t("th",null,[t("input",{type:"checkbox",onChange:n[0]||(n[0]=(...e)=>o(c)&&o(c)(...e))},null,32)]),t("th",null,s(l.$t("index.title")),1),t("th",null,s(l.$t("category.status")),1),t("th",null,s(l.$t("prod.sTime")),1),t("th",null,s(l.$t("prod.eTime")),1),t("th",null,s(l.$t("category.created")),1),n[2]||(n[2]=t("th",null," ",-1))]),(a(!0),i(P,null,V(L,(e,S)=>(a(),i("tr",{key:S},[t("td",null,[R(t("input",{type:"checkbox",value:e.id,"onUpdate:modelValue":n[1]||(n[1]=u=>E(d)?d.value=u:null)},null,8,j),[[H,o(d)]])]),t("td",null,[I(C,{class:"link",to:`/flash-sales/${e.id}`},{default:m(()=>[t("h5",v,s(e.title),1)]),_:2},1032,["to"])]),t("td",{class:M(["status",{active:e.status==1}])},[t("span",null,s(o(h)(e.status)),1)],2),t("td",null,s(e.start_time),1),t("td",null,s(e.end_time),1),t("td",null,s(e.created),1),t("td",null,[l.$can("flash_sale","edit")?(a(),i("button",{key:0,onClick:_(u=>o($)(e),["prevent"]),class:"lite-btn"},s(l.$t("category.edit")),9,z)):p("",!0),l.$can("flash_sale","delete")?(a(),i("button",{key:1,onClick:_(u=>o(b)(e),["prevent"]),class:"delete-btn lite-btn"},s(l.$t("category.delete")),9,A)):p("",!0)])]))),128))]),_:1},8,["name","order-options","onDeleteBulk","onList"])}}};export{lt as default};
