import{c as n,o,b as c,t as d,p as g,a,i as h,u as p,Z as l,F as _}from"./app-B4kV47qU.js";import v from"./ChatLayout-CPoSNThj.js";import b from"./MessageContainer-B8kpT0sp.js";import f from"./Modals-C2QcU6Xx.js";import k from"./RightSidebar-CUS5Vug2.js";import{_ as y}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{_ as $}from"./UserLayout-DG2qUs8x.js";import{u as C}from"./chatStore-CTtmOQOw.js";import{s as x}from"./sharedComposable-VJJUONp6.js";import"./LeftSidebar-DOEYntqN.js";import"./IntersectionObserver-DbdokySM.js";import"./moment-BAtM24Ew.js";import"./modalStore-BgORG3Nn.js";import"./SpinnerBtn-B3fjBeDL.js";import"./toastComposable-CvcyPmJb.js";import"./assetStore-cDK0Afhq.js";import"./Header-Debu5j2t.js";import"./echoServiceComposable-n1MnmRL6.js";import"./MediaPreview-DyjxtSXz.js";import"./QuickReplyPreview-B02GpzkT.js";import"./ReplyPreview-C6uvOHOI.js";import"./MessagePreview-BkhhnYFk.js";import"./PollPreview-DtWnWRrq.js";import"./LocationPreview-CZAH32iX.js";import"./AssetModal-vtiWQmiY.js";import"./Modal-ChMy0A7y.js";import"./MultiSelect-Ba8gY0R1.js";import"./multiselect-Bn1369QT.js";import"./NoDataFound-su6Kbmdk.js";import"./TemplateMessageModal-Be5_QdRy.js";import"./TemplatePreview-BCVClSSu.js";import"./QuickReplyModal-Csqxk8X3.js";import"./ToastrContainer-Cfx6wOd2.js";const w={},S={class:"card card-body flex flex-col gap-4 items-center justify-center"},B={class:"text-gray-400 dark:text-gray-500"};function q(i,s){return o(),n("div",S,[s[0]||(s[0]=c("img",{class:"w-2/3",src:"/assets/svg/chatting.svg",alt:""},null,-1)),c("h4",B,d(i.trans("Start a conversation")),1)])}const N=y(w,[["render",q]]),nt=Object.assign({layout:[$,v]},{__name:"Index",props:["platforms","chat_templates","quick_replies","badges","api_base_url","languages","module_features"],setup(i){const{authUser:s}=x(),t=i,e=C();return g(()=>{var r,m;e.features=t.module_features,e.$patch({baseApiUrl:t.api_base_url??"",platforms:t.platforms??[],chatTemplates:t.chat_templates??[],quickReplies:t.quick_replies??[],aiTemplates:t.ai_templates??[],badges:t.badges??[],languages:t.languages??[],conversations:[]}),e.platforms.forEach(u=>{e.fetchConversations(u)}),e.connectWebSocket(`live-chat.whatsapp-web.${(m=(r=s.value)==null?void 0:r.active_workspace)==null?void 0:m.owner_id}`)}),(r,m)=>(o(),n(_,null,[a(p(l),{title:r.trans("Whatsapp Conversations")},null,8,["title"]),a(f),a(p(l),{title:r.trans("Chats")},null,8,["title"]),p(e).hasActiveConversation?(o(),n(_,{key:0},[a(b),a(k),a(f)],64)):(o(),h(N,{key:1}))],64))}});export{nt as default};
