import { createPinia } from 'pinia' import { createApp, h } from 'vue' import GeneratedPluginView from '../components/GeneratedPluginView.vue' import '../styles/index.css' function generatedApiBase(location: Location): string { const pluginPath = new URL('.', location.href).pathname.replace(/\/$/, '') return `/api${pluginPath}` } const app = createApp({ name: 'MintGeneratedUiApp', render: () => h(GeneratedPluginView, { baseUrl: generatedApiBase(window.location), showStandaloneLabel: true, }), }) app.use(createPinia()) app.mount('#app')