import{_ as m}from"./AdminLayout-bd13ff9d.js";import{_ as f}from"./PageHeader-8c638686.js";import{s as v,h as r,c as i,a as n,b as t,t as e,F as w,r as b,g as k,o as c,u as d,j as p}from"./app-13978987.js";import"./dropdown-45d66330.js";const P={class:"container flex-grow p-4 sm:p-6"},x={class:"space-y-6"},y={class:"table-responsive whitespace-normal rounded-primary"},C={class:"table"},L={class:""},U={class:""},B={class:"text-right"},D={class:"text-right"},E={class:"flex"},I=["src"],$={class:"text-left"},j={class:"text-right"},F={class:"dropdown","data-placement":"bottom-start"},N={class:"dropdown-toggle"},V={class:"dropdown-content w-40"},z={class:"dropdown-list"},A={class:"dropdown-list-item"},H={class:"dropdown-list-item"},O={class:"card-footer py-4"},R=k({layout:m}),M=Object.assign(R,{__name:"Index",props:["posts","segments","buttons"],setup(s){const{textExcerpt:u,deleteRow:h}=v();return(a,S)=>{const l=r("Icon"),_=r("Link"),g=r("Paginate");return c(),i("main",P,[n(f,{title:a.trans("How it works"),buttons:s.buttons},null,8,["title","buttons"]),t("div",x,[t("div",y,[t("table",C,[t("thead",null,[t("tr",null,[t("th",L,e(a.trans("Title")),1),t("th",U,e(a.trans("Description")),1),t("th",B,e(a.trans("Language")),1),t("th",D,e(a.trans("Action")),1)])]),t("tbody",null,[(c(!0),i(w,null,b(s.posts.data,o=>(c(),i("tr",{key:o.id},[t("td",E,[t("img",{src:o.preview.value,class:"avatar rounded-circle mr-3"},null,8,I),t("span",null,e(d(u)(o.title,30)),1)]),t("td",$,e(d(u)(o.excerpt.value,50)),1),t("td",j,e(o.lang),1),t("td",null,[t("div",F,[t("div",N,[n(l,{class:"text-2xl",icon:"bx:dots-horizontal-rounded"})]),t("div",V,[t("ul",z,[t("li",A,[n(_,{href:a.route("admin.features.edit",o.id),class:"dropdown-link"},{default:p(()=>[n(l,{icon:"fe:edit"}),t("span",null,e(a.trans("Edit")),1)]),_:2},1032,["href"])]),t("li",H,[n(_,{as:"button",class:"dropdown-link",onClick:T=>d(h)("/admin/features/"+o.id)},{default:p(()=>[n(l,{icon:"fe:trash"}),t("span",null,e(a.trans("Delete")),1)]),_:2},1032,["onClick"])])])])])])]))),128))])]),t("div",O,[n(g,{links:s.posts.links,currentPage:s.posts.current_page,from:s.posts.from,lastPage:s.posts.last_page,lastPageUrl:s.posts.last_page_url,nextpageurl:s.posts.next_page_url,perPage:s.posts.per_page,prevPageUrl:s.posts.prev_page_url,to:s.posts.to,total:s.posts.total},null,8,["links","currentPage","from","lastPage","lastPageUrl","nextpageurl","perPage","prevPageUrl","to","total"])])])])])}}});export{M as default};
