async function boot() {
	try {
		const cfg = await window.API.get('/api/config/public');
		window.CUSTOM_REQUEST_PRICE_CENTS = cfg.CUSTOM_REQUEST_PRICE_CENTS;
	} catch {}
	const root = ReactDOM.createRoot(document.getElementById('root'));
	root.render(
		React.createElement(
			window.Toast.ToastProvider,
			null,
			React.createElement(
				window.AuthContext.AuthProvider,
				null,
				React.createElement(
					window.CartContext.CartProvider,
					null,
					React.createElement(App)
				)
			)
		)
	);
}

// Fetch public config for client
fetch('/api/config/public').then(r=>r.json()).then(cfg => {
  window.CUSTOM_REQUEST_PRICE_CENTS = cfg.CUSTOM_REQUEST_PRICE_CENTS;
}).catch(()=>{});
boot();
