import{L as n,j as i,al as l}from"./vendor-mui-core-D7t4vMS5.js";import{m as d,r as c}from"./vendor-react-DX7tU9aY.js";import{W as u,aO as h}from"./vendor-ux-Dl3wVbv_.js";import g from"./index-DGU5RA0-.js";import"./vendor-utils-BzQg432x.js";import"./vendor-hooks-DAZ1H6Va.js";import"./index-Ca33rdd_.js";import"./vendor-arcblock-ivFYo5vP.js";import"./confirm-DQYDHHdS.js";import"./index-DBs9Ljax.js";import"./session-lE2gmzzF.js";import"./did-address-DRYM96gB.js";import"./empty-spinner-ChYvCNCV.js";import"./bundle-avatar-sDqev1Fh.js";import"./shorten-label-1iJcvGQT.js";import"./list-header-DQZTNnUc.js";import"./click-to-copy-RBTqACSW.js";import"./question-mark-circle.svg-B0bcUgC5.js";import"./useSetState-CUbypYGT.js";import"./engine-L1SEogaX.js";import"./api-B8JXuhVp.js";import"./vendor-mui-x-BpPw6UfF.js";import"./react-beautiful-dnd.esm-bkXlrjYw.js";import"./raf-schd.esm-BZ-2sjAE.js";import"./wait-connect-DOIonmAv.js";import"./get-safe-url-D4zRnTpF.js";import"./item-DoUn7xhc.js";import"./delete-confirm-CpaOkuin.js";import"./index-zkaWHEAS.js";import"./index-DvQIPWQ6.js";import"./purify.es-HRjpPm7y.js";import"./index-CbZQvtgh.js";import"./joi-browser.min-eEVeW7LC.js";import"./joi-browser.min-CUdv8seQ.js";const r=new URL(window.location.href),s=r.searchParams.get("mode")==="dialog",w=s?"":r.searchParams.get("padding")||"";function Y(){const{t:p}=u(),{componentDid:o}=d(),m=n(t=>t.breakpoints.down("md")),a=t=>{t.stopPropagation(),window.parent.postMessage({event:"resourceDialog.close",componentDid:o},"*")};c.useEffect(()=>{window.parent.postMessage({event:"resourceDialog.loaded",componentDid:o},"*")},[o]);const e=i.jsx(g,{padding:w,initUrl:r});return s?i.jsx(h,{className:"studio-dialog",title:p("blocklet.publish.blockletStudio"),maxWidth:!1,fullWidth:!1,PaperProps:{style:m?{width:"100%",height:window.innerHeight}:{maxWidth:1350,minWidth:930,width:"80%"}},onClose:a,showCloseButton:!0,disableEscapeKeyDown:!0,open:!0,children:i.jsx(l,{sx:{height:"72vh",overflow:"auto",position:"relative"},children:e})}):e}export{Y as default};
