import React,{ StrictMode } from 'react'
import ReactDOM from 'react-dom'
import jsxRuntime from 'react/jsx-runtime'
import { createRoot } from 'react-dom/client'
import './index.less'
import LayoutApp from './layouts'
import * as antd from 'antd';
import * as ProComponents from '@ant-design/pro-components';
import * as CraftjsCore from '@craftjs/core';
window.React = React;
window.ReactDOM = ReactDOM;
declare global {
  interface Window {
    antd?: typeof antd; // 可选属性更安全
    jsx?: typeof jsxRuntime;
    ProComponents?: typeof ProComponents;
    CraftjsCore?: typeof CraftjsCore;
  }
}
window.antd = antd;
window.jsx = jsxRuntime;
window.ProComponents = ProComponents;
window.CraftjsCore = CraftjsCore;

createRoot(document.getElementById('root')!).render(
  <StrictMode>
    <LayoutApp />
   </StrictMode>,
)
