import{_ as b}from"./AdminLayout-DeT_GLTC.js";import{d as f,s as v,f as s,r as h,c as d,o as r,a as t,b as l,t as o,u as e,F as x,g,n as w,w as k}from"./app-Do7K7VDV.js";import{_ as C}from"./Paginate-BZTS8QtF.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const P={class:"table-responsive whitespace-nowrap rounded-primary"},y={class:"table"},A={class:"!text-right"},I={class:"text-left"},$={class:"text-left"},B=["href"],D={class:"text-left"},E={class:"dropdown","data-placement":"bottom-start"},L={class:"dropdown-toggle"},F={class:"dropdown-content w-40"},N={class:"dropdown-list"},S={class:"dropdown-list-item"},T={class:"dropdown-list-item"},V=["onClick"],j=f({layout:b}),M=Object.assign(j,{__name:"Index",props:["pages","totalActivePosts","totalInActivePosts","totalPosts","buttons"],setup(n){const{textExcerpt:_,deleteRow:m}=v(),i=n;return i.totalPosts,s("Total Page"),i.totalActivePosts,s("Active Page"),i.totalInActivePosts,s("Inactive Page"),(u,z)=>{const c=h("Icon"),p=h("Link");return r(),d("div",P,[t("table",y,[t("thead",null,[t("tr",null,[t("th",null,o(e(s)("Title")),1),t("th",null,o(e(s)("Url")),1),t("th",null,o(e(s)("Status")),1),t("th",A,o(e(s)("Action")),1)])]),t("tbody",null,[(r(!0),d(x,null,g(n.pages.data,a=>(r(),d("tr",{key:a.id},[t("td",I,o(e(_)(a.title,50)),1),t("td",$,[t("a",{href:`/${a.slug}`,target:"_blank"}," /"+o(e(_)(a.slug,100)),9,B)]),t("td",D,[t("span",{class:w(["badge",a.status==1?"badge-success":"badge-danger"])},o(a.status==1?e(s)("Active"):e(s)("Draft")),3)]),t("td",null,[t("div",E,[t("div",L,[l(c,{class:"w-30 text-lg",icon:"bi:three-dots-vertical"})]),t("div",F,[t("ul",N,[t("li",S,[l(p,{href:u.route("admin.page.edit",a.id),class:"dropdown-link"},{default:k(()=>[l(c,{class:"h-6 text-slate-400",icon:"material-symbols:edit-outline"}),t("span",null,o(e(s)("Edit")),1)]),_:2},1032,["href"])]),t("li",T,[t("button",{as:"button",class:"dropdown-link",onClick:O=>e(m)(u.route("admin.page.destroy",a.id))},[l(c,{class:"h-6",icon:"material-symbols:delete-outline"}),t("span",null,o(e(s)("Delete")),1)],8,V)])])])])])]))),128))])]),l(C,{links:n.pages.links},null,8,["links"])])}}});export{M as default};
