import{d as S,w as _,q as a,x as u,S as A,n as s,v as P,u as e,s as c,l as v}from"../../../../common/index.CPcBO1Os.js";import{u as y,g as n,b as C}from"../index.CjI1uML7.js";import{u as k}from"../../../../common/vue-router.jJOaD9p9.js";import{u as x}from"../../../../common/index.B24w2ZeB.js";import"../../../../common/index.TkDYtvUB.js";import"../../../../common/index.BA7kDUNA.js";const j=S({__name:"IndexPage",setup(b){const o=k(),g=y(),{on:p}=x("saaiSettingsSaved"),m=n("pages/ConnectPage.vue"),d=n("pages/AiAgentSettingsPage.vue"),l=n("pages/SettingsPage.vue"),f=n("pages/DashboardPage.vue");return p(t=>{t==="product-questions-ai"&&setTimeout(()=>{window.location.reload()},1e3)}),_(()=>o.query.agent,t=>{g.agent=t?g.aiAgents[g.getAgentIndex(t)]:null}),(t,h)=>(s(),a(A,null,{fallback:u(()=>[v(C)]),default:u(()=>{var i,r;return[e(c)().isConnected?((i=e(o).query)==null?void 0:i.agent)!=null?(s(),a(e(d),{key:1})):((r=e(o).query)==null?void 0:r.page)==="storeagent-settings"?(s(),a(e(l),{key:2})):e(c)().isConnected?(s(),a(e(f),{key:3})):P("",!0):(s(),a(e(m),{key:0}))]}),_:1}))}});export{j as default};
