/* Roundhouse — clickable prototype.
   Single centered iOS phone, Wild ring-hub home, all flows tappable.
   Everyone lands as new user. Developer toggle hidden in Settings (tap version 7×). */

const SCREENS = {
  home:           Home,
  plan:           PlanTrip,
  picker:         SessionPicker,
  live:           LiveSession,
  log:            QuickLog,
  malfunction:    MalfunctionLog,
  reconcile:      SessionReconcile,
  cascade:        Cascade,
  record:           Record,
  firearm:          FirearmDetail,
  suppressordetail: SuppressorDetail,
  maintain:       Maintain,
  supply:         Supply,
  caliber:        CaliberDetail,
  addlot:         AddLot,
  protect:        Protect,
  gear:           Gear,
  guns:           GunsPage,
  gundetail:      GunDetail,
  editgun:        GunConfigEditor,
  accessories:    AccessoriesPage,
  suppressors:    SuppressorsPage,
  modifications:  ModificationsPage,
  addgun:         AddGun,
  addaccessory:   AddAccessory,
  addsuppressor:  AddSuppressor,
  settings:       Settings,
  goalslibrary:   GoalsLibrary,
};

function App() {
  const [emptyMode, setEmptyMode] = React.useState(true);

  window.__rhSetEmptyMode = setEmptyMode;
  window.__rhEmptyMode = emptyMode;

  return (
    <div className="proto-stage">
      <Phone
        key={emptyMode ? 'empty' : 'pop'}
        initial="home"
        navStyle="tabs"
        screens={SCREENS}
        emptyMode={emptyMode}
      />
    </div>
  );
}

ReactDOM.createRoot(document.getElementById('root')).render(<App/>);
