import{L as c}from"./logger.js";import{aq as e,b as m,j as t,r,C as p,e as w,A as u}from"./utils.js";import{g}from"./lowCodeApi.js";import{l as h,L as f}from"./zh_CN.js";import"./LowCode2.js";import"./index2.js";const y=new c("lowcode"),d=e("lowCodeType")||"preview",i=e("pageId"),C=e("debugUrl"),x=e("remoteSchemaUrl"),b=()=>{const[l,j]=r.useState(()=>d==="editor"?{width:"100vw",height:"100vh"}:i==="popup"?(document.body.style.width="500px",document.body.style.height="500px",{width:"500px",height:"500px"}):{width:"100vw",height:"100vh"}),a=r.useCallback(async()=>{if(C){window.document.title="调试指定 url";return}const n=e("lowCodeTitle");if(n){window.document.title=n;return}const s=`低代码-${d}-${i}`;try{const o=await g();window.document.title=o.name||s}catch(o){y.error("根据 pageId 查询页面信息失败",i,o),window.document.title=s}},[]);return r.useEffect(()=>{a()},[]),t.jsx(p,{locale:h,theme:{token:{colorPrimary:w}},children:t.jsx(u,{children:t.jsx(f,{remoteSchemaUrl:x,style:l})})})};m.createRoot(document.getElementById("root")).render(t.jsx(b,{}));
