import{Kn as e,at as t}from"./src-CD6Jsigc.js";import"./src-C_qKxWab.js";import{r as n}from"./axios-DSyjHw-i.js";import{h as r}from"./useApi-CROJJdhE-bFLQvr8j.js";import{t as i}from"./backendApi-BRM6WgjB.js";import{t as a}from"./useOpenInBrowser-J8s_TNr-.js";var o=e(`panel-left-close`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m16 15-3-3 3-3`,key:`14y99z`}]]),s=e(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),c=e(`panel-top-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m15 14-3 3-3-3`,key:`g215vf`}]]),l=`bluebottle-scene-editor`;function u(e){let n=r();async function i(){if(e.isInApp()){try{await e.openInAppWindow()}catch(n){console.error(`Could not open the Scene Editor window`,n),t.error(e.t(`sceneEditor.window.openFailed`))}return}let r=n.resolve({name:`scene-editor`,query:{browser:`1`}}).href,i=window.open(r,l,`popup,width=1440,height=900`);if(i){i.focus();return}t.warning(e.t(`sceneEditor.window.popupBlocked`)),e.popupBlockedFallback?.()}return{openSceneEditorWindow:i}}function d(){let{t:e}=n();return u({isInApp:a,openInAppWindow:()=>i.post(`scene-editor/session/window`),t:e})}export{o as i,c as n,s as r,d as t};