import { createInertiaApp } from '@inertiajs/vue3'; import { createApp, h } from 'vue'; import { Toaster } from '@/components/ui/sonner'; import { useFlashToast } from '@/composables/useFlashToast'; const appName = import.meta.env.VITE_APP_NAME || 'Laravel'; createInertiaApp({ title: (title) => (title ? `${title} - ${appName}` : appName), progress: { color: '#4B5563', }, setup({ el, App, props, plugin }) { if (!el) { return; } const app = createApp({ setup() { useFlashToast(); return () => [h(App, props), h(Toaster)]; }, }); app.use(plugin); app.mount(el); }, });