import{d as v,K as y,b as n,c as D,z as r,t as m,D as i,F as k,J as P,H as g,q as w}from"./registerWidgets.802bba2f.js";import{D as q,n as x}from"./DashPlayer.7a1ba98a.js";import{L as B}from"./CircularLoading.5c7f2ad7.js";import{r as R}from"./index.4c7aa394.js";import{B as I}from"./BackButton.ed82b7de.js";import{a as l}from"./asyncComputed.1364aaa9.js";import{D as C}from"./dashes.ca1ade9b.js";import{W as F}from"./workspaces.4c177a35.js";import"./passwordlessManager.d5134797.js";import"./runnerData.37fb2c95.js";import"./WidgetsFrame.8834ece7.js";import"./icons.1dc8a69b.js";import"./Modal.e13f7972.js";import"./log.8028a717.js";import"./Passwordless.8321b1ad.js";import"./utils.95f0e9e8.js";import"./pubsub.a0411919.js";const E=v({__name:"DashPreview",setup(L){const t=P(),s=g(),c=({id:e,type:o})=>{o==="dash"?(s.push({name:"dashPreview",params:{dashId:e},query:t.query}),f()):s.push({name:"form-preview",params:{formId:e},query:t.query})},d=()=>{var e;!((e=a.value)!=null&&e.path)||s.push(`/_editor/dash/${encodeURIComponent(a.value.path)}`)},{loading:h,result:a,refetch:f}=l(()=>C.get(t.params.dashPath)),{result:u}=l(()=>F.get()),p=y(()=>{if(!a.value||!u.value||!a.value.makeRunnerData(u.value))return null;const e=x.create(a.value.makeRunnerData(u.value),!1);return e.onRedirect(({url:o,queryParams:_})=>R(s,o,_)),e});return(e,o)=>(n(),D(k,null,[r(h)||!r(a)?(n(),m(B,{key:0,class:"loading",justify:"center"})):i("",!0),r(p)?(n(),m(q,{key:1,class:"player",dash:r(p).runnerData,"is-preview":!0,params:r(t).query,"dash-player-state":r(p),onNavigate:c},null,8,["dash","params","dash-player-state"])):i("",!0),r(a)?(n(),m(I,{key:2,onExitFullscreenPreview:d})):i("",!0)],64))}});const T=w(E,[["__scopeId","data-v-dde58483"]]);export{T as default};
//# sourceMappingURL=DashPreview.2dbb6c75.js.map
