import{_ as b}from"./DuhDFJjj.js";import{a as P}from"./Z4eZ-m2s.js";import{O as C,j as N,d as w,w as d,m as l,o as s,b as e,c as a,t as o,F as B,g as x,f as L,e as c,E as p}from"./Bgmy51Qv.js";import{u as V}from"./CYl1ofbh.js";import"./7pZkuj9N.js";import"./BHvLfWtM.js";import"./hSbGpNHU.js";import"./ByXs6QR-.js";import"./D_7E8SMU.js";const E={class:"lite-bold"},F={class:"mx-w-300x"},O=["onClick"],R=["onClick"],G={__name:"index",setup(j){const{t:r}=C(),m=N({created_at:{title:r("category.date")},title:{title:r("index.title")},slug:{title:r("category.slug")}}),{listPageRef:g,editNode:u,deleteNode:_}=V();return(t,i)=>{const f=b,k=P;return s(),w(k,{ref_key:"listPageRef",ref:g,"list-api":"getPages","delete-api":"deletePage","empty-store-variable":"allPages","route-name":"pages",name:t.$t("admin.page"),"order-options":l(m),gate:"page"},{table:d(({list:y})=>[e("tr",E,[e("th",null,o(t.$t("index.title")),1),e("th",null,o(t.$t("category.slug")),1),e("th",null,o(t.$t("category.created")),1),i[0]||(i[0]=e("th",null," ",-1))]),(s(!0),a(B,null,x(y,(n,$)=>(s(),a("tr",{key:$},[e("td",null,[L(f,{to:`/pages/${n.id}`,class:"link"},{default:d(()=>[e("h5",F,o(n.title),1)]),_:2},1032,["to"])]),e("td",null,o(n.slug),1),e("td",null,o(n.created),1),e("td",null,[t.$can("page","edit")?(s(),a("button",{key:0,onClick:p(h=>l(u)(n),["prevent"]),class:"lite-btn"},o(t.$t("category.edit")),9,O)):c("",!0),t.$can("page","delete")?(s(),a("button",{key:1,onClick:p(h=>l(_)(n),["prevent"]),class:"delete-btn lite-btn"},o(t.$t("category.delete")),9,R)):c("",!0)])]))),128))]),_:1},8,["name","order-options"])}}};export{G as default};
