import{_ as f}from"./FilterDropdown-B678SkyV.js";import{_ as v}from"./Paginate-DtQjslkz.js";import{_ as b}from"./NoDataFound-su6Kbmdk.js";import{s as w}from"./sharedComposable-VJJUONp6.js";import{r as g,c as i,o as a,b as e,i as u,t as o,F as k,g as q,u as m,n as y,a as n,w as R,Y as C,j as $,f as x}from"./app-B4kV47qU.js";import{_ as j}from"./UserLayout-DG2qUs8x.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 B={class:"table-responsive mt-4 w-full"},I={class:"table"},N={class:"w-8"},S={class:"w-32"},T={class:"w-32 !text-right"},V={key:0,class:"tbody"},D={class:"flex justify-end"},E={class:"dropdown","data-placement":"bottom-start"},L={class:"dropdown-toggle"},O={class:"dropdown-content w-56"},A={class:"dropdown-list"},F={class:"dropdown-list-item"},M={class:"dropdown-list-item"},z=["onClick"],Y={class:"w-full"},G={__name:"List",props:{module:{type:String,required:!0},quickReplies:{type:Object,required:!0}},setup(s){const{deleteRow:r,textExcerpt:c,badgeClass:p}=w();return(t,H)=>{const d=g("Icon");return a(),i("div",B,[e("table",I,[e("thead",null,[e("tr",null,[e("th",N,o(t.trans("#")),1),e("th",null,o(t.trans("Message Template")),1),e("th",S,o(t.trans("Status")),1),e("th",T,o(t.trans("Action")),1)])]),s.quickReplies.data.length?(a(),i("tbody",V,[(a(!0),i(k,null,q(s.quickReplies.data,(l,_)=>{var h;return a(),i("tr",{key:_},[e("td",null,o(_+1),1),e("td",null,o(m(c)(l.message_template,160)),1),e("td",null,[e("span",{class:y(m(p)(l.status))},o(l.status==="active"?"active":"inactive"),3)]),e("td",null,[e("div",D,[e("div",E,[e("div",L,[n(d,{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),e("div",O,[e("ul",A,[e("li",F,[(a(),u(C(((h=t.$page.props)==null?void 0:h.activeModule)===s.module?"Link":"a"),{class:"dropdown-link",href:t.route(`user.${s.module}.quick-replies.edit`,l.id)},{default:R(()=>[n(d,{icon:"bx:bxs-edit-alt"}),e("span",null,o(t.trans("Edit")),1)]),_:2},1032,["href"]))]),e("li",M,[e("button",{class:"dropdown-link delete-confirm",onClick:J=>m(r)(t.route(`user.${s.module}.quick-replies.destroy`,l.id))},[n(d,{icon:"bx:trash"}),$(" "+o(t.trans("Delete")),1)],8,z)])])])])])])])}),128))])):(a(),u(b,{key:1,forTable:!0}))]),e("div",Y,[s.quickReplies.data.length?(a(),u(v,{key:0,links:s.quickReplies.links},null,8,["links"])):x("",!0)])])}}},re=Object.assign({layout:j},{__name:"Index",props:["quickReplies"],setup(s){const r=s,c=[{label:"Template",value:"message_template"},{label:"Status",value:"status",options:[{label:"Active",value:"active"},{label:"Inactive",value:"inactive"}]}];return(p,t)=>(a(),i(k,null,[n(f,{options:c}),n(G,{module:"whatsapp",quickReplies:r.quickReplies},null,8,["quickReplies"])],64))}});export{re as default};
