// Mount each variation into its root. Done at end so Babel files above have defined globals.

const mountOnce = (id, Component) => {
  const el = document.getElementById(id);
  if (!el || el.dataset.mounted) return;
  el.dataset.mounted = 'yes';
  ReactDOM.createRoot(el).render(<Component />);
};

mountOnce('v-shell',    window.ShellRoot);
mountOnce('v-workshop', window.WorkshopRoot);
mountOnce('v-trail',    window.TrailRoot);
