import React from 'react';
import ReactDOM from 'react-dom/client';
import OnboardWizard from './OnboardWizard';
import './src/styles/globals.css';

function App() {
  const handleComplete = () => {
    // Notify the parent (dashboard) that onboarding is done
    window.parent?.postMessage({ type: 'bloby:onboard-complete' }, '*');
  };

  return <OnboardWizard onComplete={handleComplete} isInitialSetup />;
}

ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <App />
  </React.StrictMode>,
);
