// 创建框架入口文件
import Engine from './src/core/Engine.js';
import SimplifiedEngine, { PE } from './src/core/SimplifiedEngine.js';

// 导入所有类以便外部使用
import BaseElement from './src/elements/BaseElement.js';
import Sprite from './src/elements/Sprite.js';
import Box from './src/elements/Box.js';
import TextElement from './src/elements/TextElement.js';
import HtmlElement from './src/elements/HtmlElement.js';
import SvgElement from './src/elements/SvgElement.js';
import GameObject from './src/elements/GameObject.js';
import { Component, PhysicsComponent, ColliderComponent, AnimationComponent, InputComponent, LifecycleComponent } from './src/elements/Component.js';

// 导入简化版元素类
import { SimplifiedSprite, SimplifiedBox, SimplifiedText, SimplifiedHtml, SimplifiedSvg } from './src/elements/SimplifiedElements.js';
import { SimplifiedGameObject, SimplifiedComponentFactory, SimplifiedGameObjectFactory } from './src/elements/SimplifiedGameObject.js';

import EventBus from './src/utils/EventBus.js';
import { SimplifiedEventBus, eventBus, EVENTS } from './src/utils/SimplifiedEventBus.js';

import ResourceManager from './src/managers/ResourceManager.js';
import SceneManager from './src/managers/SceneManager.js';
import AudioManager from './src/managers/AudioManager.js';
import Camera from './src/managers/Camera.js';

// 导入简化版管理器
import { SimplifiedResourceManager } from './src/managers/SimplifiedResourceManager.js';
import { SimplifiedSceneManager } from './src/managers/SimplifiedSceneManager.js';
import { SimplifiedAudioManager } from './src/managers/SimplifiedAudioManager.js';
import { SimplifiedCamera } from './src/managers/SimplifiedCamera.js';

import Tween from './src/animation/Tween.js';
import AnimationSystem from './src/animation/AnimationSystem.js';
import AnimationController from './src/animation/AnimationController.js';
import { SimplifiedAnimation } from './src/animation/SimplifiedAnimation.js';

import { Particle, ParticleEmitter, ParticleSystem } from './src/effects/ParticleSystem.js';
import { SimplifiedParticleSystem, SimplifiedParticleEmitter, SimplifiedParticleFactory } from './src/effects/SimplifiedParticleSystem.js';

import { UIElement, UIButton, UILabel, UIImage, UISlider, UIManager } from './src/ui/UI.js';
import { SimplifiedUIManager, SimplifiedButton, SimplifiedLabel, SimplifiedImage, SimplifiedSlider } from './src/ui/SimplifiedUI.js';

import { SimplifiedComponent, SimplifiedPhysicsComponent, SimplifiedColliderComponent, SimplifiedAnimationComponent, SimplifiedInputComponent, SimplifiedLifecycleComponent, SimplifiedComponentFactory as ComponentFactory } from './src/elements/SimplifiedComponent.js';

// 导出所有类以便外部使用
export { 
  // 核心类
  Engine,
  SimplifiedEngine,
  
  // 元素类
  BaseElement,
  Sprite,
  Box,
  TextElement,
  HtmlElement,
  SvgElement,
  GameObject,
  
  // 简化版元素类
  SimplifiedSprite,
  SimplifiedBox,
  SimplifiedText,
  SimplifiedHtml,
  SimplifiedSvg,
  
  // 游戏对象类
  SimplifiedGameObject,
  SimplifiedGameObjectFactory,
  
  // 组件类
  Component,
  PhysicsComponent,
  ColliderComponent,
  AnimationComponent,
  InputComponent,
  LifecycleComponent,
  
  // 简化版组件类
  SimplifiedComponent,
  SimplifiedPhysicsComponent,
  SimplifiedColliderComponent,
  SimplifiedAnimationComponent,
  SimplifiedInputComponent,
  SimplifiedLifecycleComponent,
  SimplifiedComponentFactory,
  ComponentFactory,
  
  // 工具类
  EventBus,
  SimplifiedEventBus,
  eventBus,
  EVENTS,
  
  // 管理器
  ResourceManager,
  SceneManager,
  AudioManager,
  Camera,
  
  // 简化版管理器
  SimplifiedResourceManager,
  SimplifiedSceneManager,
  SimplifiedAudioManager,
  SimplifiedCamera,
  
  // 动画系统
  Tween,
  AnimationSystem,
  AnimationController,
  SimplifiedAnimation,
  
  // 特效系统
  Particle,
  ParticleEmitter,
  ParticleSystem,
  SimplifiedParticleSystem,
  SimplifiedParticleEmitter,
  SimplifiedParticleFactory,
  
  // UI系统
  UIElement,
  UIButton,
  UILabel,
  UIImage,
  UISlider,
  UIManager,
  SimplifiedUIManager,
  SimplifiedButton,
  SimplifiedLabel,
  SimplifiedImage,
  SimplifiedSlider,
  
  // 简化版全局对象
  PE
};

// 设置全局变量（可选）
window.PE = PE;

export default Engine;