import{d as f,s as b,r as w,c as o,o as n,a as s,b as l,e as k,t,F as v,g as y,u as r,w as x,h as _,aa as m}from"./app-Do7K7VDV.js";import{_ as C}from"./Paginate-BZTS8QtF.js";import{_ as B}from"./NoDataFound-BCWTwO3P.js";import{_ as N}from"./AdminLayout-DeT_GLTC.js";import"./AssetModal-C18ToIEK.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./InputFieldError-0BmYlL24.js";import"./ToastrContainer-CtYDvNPN.js";const $={class:"table-responsive w-full"},j={class:"table"},D={class:"!text-right"},L={class:"!text-right"},T={key:0,class:"tbody"},V={class:"badge badge-primary"},E={class:"!text-right"},F={key:0,class:"badge badge-success"},I={key:1,class:"badge badge-warning"},M={class:"flex justify-end"},O={class:"dropdown","data-placement":"bottom-start"},S={class:"dropdown-toggle"},A={class:"dropdown-content w-56"},K={class:"dropdown-list"},q={class:"dropdown-list-item"},z=["onClick"],G=f({layout:N}),R=Object.assign(G,{__name:"Index",props:["autoReplies"],setup(d){const{deleteRow:h,textExcerpt:u}=b();return(a,H)=>{const p=w("Link");return n(),o("div",$,[s("table",j,[s("thead",null,[s("tr",null,[s("th",null,t(a.trans("Device Name")),1),s("th",null,t(a.trans("Message Type")),1),s("th",null,t(a.trans("Keywords")),1),s("th",null,t(a.trans("Message")),1),s("th",null,t(a.trans("Owner")),1),s("th",D,t(a.trans("Status")),1),s("th",L,t(a.trans("Action")),1)])]),d.autoReplies.data.length?(n(),o("tbody",T,[(n(!0),o(v,null,y(d.autoReplies.data,(e,g)=>{var c;return n(),o("tr",{key:g},[s("td",null,t((c=e.platform)==null?void 0:c.name),1),s("td",null,[s("span",V,t(e.message_type),1)]),s("td",null,t(e.keywords.join(", ")),1),s("td",null,t(e.message_type=="template"?r(u)(e.message_template??e.message_type,50):e.message_type),1),s("td",null,[l(p,{href:a.route("admin.users.show",e.owner)},{default:x(()=>{var i;return[_(t((i=e.owner)==null?void 0:i.name),1)]}),_:2},1032,["href"])]),s("td",E,[e.status=="active"?(n(),o("span",F,t(e.status),1)):(n(),o("span",I,t(e.status),1))]),s("td",null,[s("div",M,[s("div",O,[s("div",S,[l(r(m),{class:"h-5 text-3xl text-slate-400",icon:"bx:dots-vertical-rounded"})]),s("div",A,[s("ul",K,[s("li",q,[s("button",{class:"dropdown-link delete-confirm",onClick:i=>r(h)(a.route("user.whatsapp.auto-replies.destroy",e.id))},[l(r(m),{icon:"bx:trash"}),_(" "+t(a.trans("Delete")),1)],8,z)])])])])])])])}),128))])):(n(),k(B,{key:1,forTable:!0}))]),l(C,{links:d.autoReplies.links},null,8,["links"])])}}});export{R as default};
