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.4a0d8d45.js";import{D as q,n as x}from"./DashPlayer.6bfdd30f.js";import{L as B}from"./CircularLoading.0d3d2390.js";import{r as R}from"./index.aeb68571.js";import{B as I}from"./BackButton.c99ee915.js";import{a as l}from"./asyncComputed.52d81103.js";import{D as C}from"./dashes.96daa6d5.js";import{W as F}from"./workspaces.741b6616.js";import"./passwordlessManager.60e6c76f.js";import"./runnerData.18839000.js";import"./WidgetsFrame.9a65309e.js";import"./PlayerNavbar.94c81143.js";import"./icons.778999cd.js";import"./Modal.2f62582a.js";import"./log.f9199108.js";import"./Passwordless.bf59d50c.js";import"./activeRecord.57c6bf02.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.0ebfa4d1.js.map
