/* Sea La Vie — page bootstrap. Reads <body data-page="..."> and renders. */

const PAGE_REGISTRY = {
  home:        () => <HomePage />,
  residences:  () => <ResidencesPage />,
  experiences: () => <ExperiencesPage />,
  cuisine:     () => <CuisinePage />,
  wellness:    () => <WellnessPage />,
  journal:     () => <JournalPage />,
  availability:() => <AvailabilityPage />,
  story:       () => <StoryPage />,
  contact:     () => <ContactPage />,
  privacy:     () => <PrivacyPage />,
  terms:       () => <TermsPage />,
  cookies:     () => <CookiesPage />,
  accessibility:() => <AccessibilityPage />
};

const page = (document.body.dataset.page || "home").trim().toLowerCase();
const renderFn = PAGE_REGISTRY[page] || PAGE_REGISTRY.home;

ReactDOM.createRoot(document.getElementById("root")).render(renderFn());
