import{_ as h}from"./vU4aS4uy.js";import{_ as b}from"./DuhDFJjj.js";import{a as k}from"./Z4eZ-m2s.js";import{u as C}from"./BHvLfWtM.js";import{_ as w,d as S,e as n,w as i,r as z,o as a,b as t,c as r,t as o,F as B,g as I,f as l,D as u,J as L,E as m}from"./Bgmy51Qv.js";import"./BE7GDBwC.js";import"./DKgjlGGV.js";import"./7pZkuj9N.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";const N={name:"categories",data(){return{orderOptions:{title:{title:this.$t("index.title")},category_id:{title:this.$t("category.catUp")},featured:{title:this.$t("category.featured")},created_at:{title:this.$t("category.date")},status:{title:this.$t("category.status")}}}},components:{ListPage:k},mixins:[C],computed:{},methods:{},mounted(){}},P={class:"lite-bold"},V={class:""},F={class:"mx-w-300x"},U=["onClick"],D=["onClick"];function E(e,c,O,T,g,j){const p=h,d=b,y=z("list-page");return e.$can("subcategory","view")?(a(),S(y,{key:0,ref:"listPage","list-api":"getSubCategories","delete-api":"deleteSubCategory","route-name":"sub-categories","empty-store-variable":"allSubCategories",name:e.$t("category.subCat"),gate:"subcategory","order-options":g.orderOptions},{table:i(({list:$})=>[t("tr",P,[t("th",null,o(e.$t("index.title")),1),t("th",null,o(e.$t("category.status")),1),t("th",null,o(e.$t("category.catUp")),1),t("th",null,o(e.$t("category.slug")),1),t("th",null,o(e.$t("category.featured")),1),t("th",null,o(e.$t("category.created")),1),c[0]||(c[0]=t("th",null," ",-1))]),(a(!0),r(B,null,I($,(s,f)=>(a(),r("tr",{key:f},[t("td",V,[l(d,{to:`/sub-categories/${s.id}`,class:"dply-felx j-left link"},{default:i(()=>[l(p,{class:"mr-20","lazy-src":e.getThumbImageURL(s.image),alt:s.title},null,8,["lazy-src","alt"]),t("h5",F,o(s.title),1)]),_:2},1032,["to"])]),t("td",{class:u(["status",{active:s.status==1}])},[t("span",null,o(e.getStatus(s.status)),1)],2),t("td",null,[l(d,{to:`/categories/${s.category.id}`,class:"link"},{default:i(()=>[L(o(s.category.title),1)]),_:2},1032,["to"])]),t("td",null,o(s.slug),1),t("td",{class:u(["status",{active:s.featured==1}])},[t("span",null,o(e.getFeatured(s.featured)),1)],2),t("td",null,o(s.created),1),t("td",null,[e.$can("subcategory","edit")?(a(),r("button",{key:0,onClick:m(_=>e.$refs.listPage.editItem(s.id),["prevent"]),class:"lite-btn"},o(e.$t("category.edit")),9,U)):n("",!0),e.$can("subcategory","delete")?(a(),r("button",{key:1,onClick:m(_=>e.$refs.listPage.deleteItem(s.id),["prevent"]),class:"delete-btn lite-btn"},o(e.$t("category.delete")),9,D)):n("",!0)])]))),128))]),_:1},8,["name","order-options"])):n("",!0)}const Y=w(N,[["render",E]]);export{Y as default};
