import{_ as v,s as g,b as y}from"./UserLayout-Ctdac_Wv.js";import{r as _,a as o,b as w,o as t,d as e,F as u,h as m,f as k,i as f,n as x,g as c,t as a,j as p,u as L}from"./app-YXLTuzTz.js";const $={key:0},C={class:"paginate-container mt-3"},H=["innerHTML"],T=["innerHTML"],j={__name:"Paginate",props:{links:[Object,Array],preserveState:!1,preserveScroll:!1},setup(l){return(r,s)=>{const h=_("Link");return l.links.length>3?(t(),o("div",$,[e("div",C,[(t(!0),o(u,null,m(l.links,(n,d)=>(t(),o(u,null,[n.url===null?(t(),o("div",{key:d,class:"paginate-link paginate-link-null border border-gray-200 dark:border-gray-600",innerHTML:r.sanitizeHtml(n.label)},null,8,H)):(t(),k(h,{"preserve-state":l.preserveState,"preserve-scroll":l.preserveScroll,key:`link-${d}`,class:x(["paginate-link paginate-link-active border border-gray-300 dark:border-gray-700",{"paginate-link-active-bg":n.active}]),href:r.sanitizeHtml(n.url)},{default:f(()=>[e("span",{innerHTML:r.sanitizeHtml(n.label)},null,8,T)]),_:2},1032,["preserve-state","preserve-scroll","class","href"]))],64))),256))])])):w("",!0)}}},S={class:"table"},q={class:"w-[5%]"},z={class:"w-full"},B={class:"w-[10%]"},I={class:"flex justify-end"},M={key:0,class:"text-start"},N={class:"flex justify-end"},V={class:"dropdown","data-placement":"bottom-start"},A={class:"dropdown-toggle"},D={class:"dropdown-content w-56"},E={class:"dropdown-list"},F={class:"dropdown-list-item"},O={class:"dropdown-list-item"},P=["onClick"],K=Object.assign({layout:v},{__name:"Index",props:["qaReplies"],setup(l){const{deleteRow:r}=g();return(s,h)=>{const n=_("Icon"),d=_("Link");return t(),o(u,null,[e("table",S,[e("thead",null,[e("tr",null,[e("th",q,a(s.trans("#")),1),e("th",z,a(s.trans("Title")),1),e("th",B,a(s.trans("Items")),1),e("th",I,a(s.trans("Actions")),1)])]),l.qaReplies.total?(t(),o("tbody",M,[(t(!0),o(u,null,m(l.qaReplies.data,(i,b)=>(t(),o("tr",{key:i.id},[e("td",null,a(b+1),1),e("td",null,a(i.title),1),e("td",null,a(i.items_count),1),e("td",null,[e("div",N,[e("div",V,[e("div",A,[c(n,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),e("div",D,[e("ul",E,[e("li",F,[c(d,{class:"dropdown-link",href:s.route("user.qareply.qareplies.edit",i)},{default:f(()=>[c(n,{class:"h-5 text-3xl text-slate-400",icon:"bx:edit"}),p(" "+a(s.trans("Edit")),1)]),_:2},1032,["href"])]),e("li",O,[e("a",{class:"dropdown-link",onClick:R=>L(r)(s.route("user.qareply.qareplies.destroy",i))},[c(n,{class:"h-5 text-3xl text-slate-400",icon:"bx:trash"}),p(" "+a(s.trans("Delete")),1)],8,P)])])])])])])]))),128))])):(t(),k(y,{key:1,"for-table":"true"}))]),c(j,{links:l.qaReplies.links},null,8,["links"])],64)}}});export{K as default};
