import{d as v,K as D,b as d,c as g,z as t,t as p,D as l,F as w,J as k,H as I,q as P}from"./registerWidgets.fce18b61.js";import{D as b,n as q}from"./DashPlayer.efede082.js";import{L as x}from"./CircularLoading.01aaac49.js";import{r as B}from"./index.130927bb.js";import{B as R}from"./BackButton.f77362f6.js";import{a as m}from"./asyncComputed.aceaab2d.js";import{D as C}from"./dashes.f546bec3.js";import{W as F}from"./workspaces.001f8bee.js";import"./passwordlessManager.2cd33479.js";import"./runnerData.945d2a2d.js";import"./executeJs.7046116d.js";import"./PlayerNavbar.079e91f3.js";import"./icons.99afd58c.js";import"./WidgetsFrame.bc1c8c2c.js";import"./colors.655cb633.js";import"./Modal.eb38c07a.js";import"./log.608a083b.js";import"./Passwordless.1c4f72d4.js";import"./lottie.84b3db69.js";import"./activeRecord.5ca93a47.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},a=new Error().stack;a&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[a]="8afdd269-0943-47e8-9e38-139dd70d186d",s._sentryDebugIdIdentifier="sentry-dbid-8afdd269-0943-47e8-9e38-139dd70d186d")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=k(),o=I(),c=({id:e,type:n})=>{n==="dash"?(o.push({name:"dashPreview",params:{dashId:e},query:a.query}),h()):o.push({name:"form-preview",params:{formId:e},query:a.query})},f=()=>{var e;!((e=r.value)!=null&&e.path)||o.push(`/_editor/dash/${encodeURIComponent(r.value.path)}`)},{loading:y,result:r,refetch:h}=m(()=>C.get(a.params.dashPath)),{result:u}=m(()=>F.get()),i=D(()=>{if(!r.value||!u.value||!r.value.makeRunnerData(u.value))return null;const e=q.create(r.value.makeRunnerData(u.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(d(),g(w,null,[t(y)||!t(r)?(d(),p(x,{key:0,class:"loading",justify:"center"})):l("",!0),t(i)?(d(),p(b,{key:1,class:"player",dash:t(i).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(i),onNavigate:c},null,8,["dash","params","dash-player-state"])):l("",!0),t(r)?(d(),p(R,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.9eaf3659.js.map
