import React from 'react';
import ReactDOM from 'react-dom/client';
import { App } from './App';
import { WhpConfig } from './types';
import './styles/editor.css';

// Read WHP_CONFIG injected by PHP wrapper (or null for standalone dev)
const whpConfig: WhpConfig | null = (window as any).WHP_CONFIG || null;

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <App whpConfig={whpConfig} />
  </React.StrictMode>
);
