import{_ as b}from"./FilterDropdown-B678SkyV.js";import{_ as k}from"./Paginate-DtQjslkz.js";import{_ as g}from"./NoDataFound-su6Kbmdk.js";import{s as x}from"./sharedComposable-VJJUONp6.js";import{_ as v}from"./UserLayout-DG2qUs8x.js";import{r as c,c as i,o as n,a,b as t,i as y,t as e,F as p,g as C,w as N,j as r,n as T,u as m}from"./app-B4kV47qU.js";import"./SpinnerBtn-B3fjBeDL.js";import"./toastComposable-CvcyPmJb.js";import"./Modal-ChMy0A7y.js";import"./modalStore-BgORG3Nn.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./ToastrContainer-Cfx6wOd2.js";import"./AssetModal-vtiWQmiY.js";import"./IntersectionObserver-DbdokySM.js";import"./assetStore-cDK0Afhq.js";const $={class:"table-responsive mt-4 w-full"},B={class:"table"},z={class:"w-1/3"},I={class:"!text-right"},L={class:"!text-right"},S={key:0,class:"tbody"},V={class:"capitalize"},j={class:"!text-right"},D={class:"!text-right"},E={class:"dropdown","data-placement":"bottom-start"},F={class:"dropdown-toggle"},O={class:"dropdown-content w-56"},A={class:"dropdown-list"},R={class:"dropdown-list-item"},q=["href"],G={class:"dropdown-list-item"},H=["href"],J={class:"dropdown-list-item"},K=["onClick"],dt=Object.assign({layout:v},{__name:"Index",props:["overviews","templates"],setup(d){const{deleteRow:h,badgeClass:_}=x(),u=[{label:"Name",value:"name"},{label:"Status",value:"status"}];return(s,M)=>{const w=c("Link"),l=c("Icon");return n(),i(p,null,[a(b,{options:u,title:s.trans("Templates")},null,8,["title"]),t("div",$,[t("table",B,[t("thead",null,[t("tr",null,[t("th",z,e(s.trans("Template Name")),1),t("th",null,e(s.trans("Type")),1),t("th",I,e(s.trans("Status")),1),t("th",L,e(s.trans("Action")),1)])]),d.templates.data.length?(n(),i("tbody",S,[(n(!0),i(p,null,C(d.templates.data,(o,f)=>(n(),i("tr",{key:f},[t("td",null,[a(w,{href:s.route("user.whatsapp-web.templates.show",o)},{default:N(()=>[r(e(o.name),1)]),_:2},1032,["href"])]),t("td",null,[t("span",V,e(o.type),1)]),t("td",j,[t("span",{class:T(["capitalize",m(_)(o.status)])},e(o.status),3)]),t("td",D,[t("div",E,[t("div",F,[a(l,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),t("div",O,[t("ul",A,[t("li",R,[t("a",{class:"dropdown-link",href:s.route("user.whatsapp-web.campaigns.create",{template_id:o.id})},[a(l,{class:"h-5 text-3xl text-slate-400",icon:"bx:plus"}),r(" "+e(s.trans("Create Campaign")),1)],8,q)]),t("li",G,[t("a",{class:"dropdown-link",href:s.route("user.whatsapp-web.templates.edit",o.id)},[a(l,{class:"h-5 text-3xl text-slate-400",icon:"bx:edit"}),r(" "+e(s.trans("Edit")),1)],8,H)]),t("li",J,[t("button",{class:"dropdown-link delete-confirm",onClick:P=>m(h)(s.route("user.whatsapp-web.templates.destroy",o.id))},[a(l,{class:"h-5 text-3xl text-slate-400",icon:"bx:trash"}),r(" "+e(s.trans("Delete")),1)],8,K)])])])])])]))),128))])):(n(),y(g,{key:1,forTable:!0}))])]),a(k,{links:d.templates.links},null,8,["links"])],64)}}});export{dt as default};
