import{d as v,K as D,b as u,c as g,z as t,t as p,D as l,F as w,J as k,H as b,q as I}from"./registerWidgets.0897334f.js";import{D as P,n as q}from"./DashPlayer.a97bdba6.js";import{L as x}from"./CircularLoading.21f27962.js";import{r as B}from"./index.366e3130.js";import{B as R}from"./BackButton.5482c988.js";import{a as m}from"./asyncComputed.14546baa.js";import{D as C}from"./dashes.f209688c.js";import{W as F}from"./workspaces.360a9dfc.js";import"./passwordlessManager.1a21d377.js";import"./runnerData.f1fab210.js";import"./executeJs.c2286e25.js";import"./PlayerNavbar.2965151e.js";import"./icons.74b4bbd7.js";import"./WidgetsFrame.1bb310ed.js";import"./colors.75cdf597.js";import"./Modal.34822eca.js";import"./log.52c594a3.js";import"./Passwordless.23bd53e4.js";import"./lottie.ffe66724.js";import"./activeRecord.6320d31c.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]="2934595a-9892-4237-be5c-73139a060f6d",s._sentryDebugIdIdentifier="sentry-dbid-2934595a-9892-4237-be5c-73139a060f6d")}catch{}})();const E=v({__name:"DashPreview",setup(s){const a=k(),o=b(),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:i}=m(()=>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"})):l("",!0),t(d)?(u(),p(P,{key:1,class:"player",dash:t(d).runnerData,"is-preview":!0,params:t(a).query,"dash-player-state":t(d),onNavigate:c},null,8,["dash","params","dash-player-state"])):l("",!0),t(r)?(u(),p(R,{key:2,onExitFullscreenPreview:f})):l("",!0)],64))}});const Z=I(E,[["__scopeId","data-v-dde58483"]]);export{Z as default};
//# sourceMappingURL=DashPreview.7ea56e31.js.map
