import{d as v,K as D,b as u,c as g,z as t,t as p,D as c,F as w,J as k,H as I,q as P}from"./registerWidgets.dc0b6768.js";import{D as b,n as q}from"./DashPlayer.e906f928.js";import{L as x}from"./CircularLoading.8d483ca6.js";import{r as B}from"./index.60bce881.js";import{B as R}from"./BackButton.780c3f1c.js";import{a as l}from"./asyncComputed.1ef6bcd7.js";import{D as C}from"./dashes.b8f114cc.js";import{W as F}from"./workspaces.964a7daa.js";import"./passwordlessManager.914ef4f9.js";import"./runnerData.68657903.js";import"./executeJs.be5526ce.js";import"./PlayerNavbar.eaceadad.js";import"./icons.79ac4c38.js";import"./WidgetsFrame.300273f9.js";import"./colors.a35572bb.js";import"./Modal.cf860ea9.js";import"./log.709af14c.js";import"./Passwordless.451bc665.js";import"./lottie.eb38a9e8.js";import"./activeRecord.81c73286.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]="3f7e492c-87fe-45f3-a108-52a04d03caf6",s._sentryDebugIdIdentifier="sentry-dbid-3f7e492c-87fe-45f3-a108-52a04d03caf6")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=k(),o=I(),m=({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}=l(()=>C.get(a.params.dashPath)),{result:i}=l(()=>F.get()),d=D(()=>{if(!r.value||!i.value||!r.value.makeRunnerData(i.value))return null;const e=q.create(r.value.makeRunnerData(i.value),!1);return e.onRedirect(({url:n,queryParams:_})=>B(o,n,_)),e});return(e,n)=>(u(),g(w,null,[t(y)||!t(r)?(u(),p(x,{key:0,class:"loading",justify:"center"})):c("",!0),t(d)?(u(),p(b,{key:1,class:"player",dash:t(d).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(d),onNavigate:m},null,8,["dash","params","dash-player-state"])):c("",!0),t(r)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):c("",!0)],64))}});const Z=P(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.a6c7f9ab.js.map
