| 1 |
/* eslint no-unused-vars: "off" */ |
| 2 |
import { createApp } from 'vue' |
| 3 |
import { createPinia } from 'pinia' |
| 4 |
import App from '../../../views/admin/App.vue' |
| 5 |
import router from '@/router' |
| 6 |
import 'maz-ui/styles' |
| 7 |
import 'element-plus/dist/index.css' |
| 8 |
import { useLabelsStore } from '@/stores/labels' |
| 9 |
import { useLabels } from '@/composables/useLabels' |
| 10 |
|
| 11 |
declare global { |
| 12 |
const wp: { |
| 13 |
media: () => void |
| 14 |
open: () => void |
| 15 |
} |
| 16 |
const wpIvyApiSettings: { |
| 17 |
root: string |
| 18 |
nonce: string |
| 19 |
} |
| 20 |
} |
| 21 |
|
| 22 |
const app = createApp(App) |
| 23 |
const pinia = createPinia() |
| 24 |
app.use(pinia) |
| 25 |
app.use(router) |
| 26 |
|
| 27 |
// Initialize the labels store with WordPress data |
| 28 |
const labelsStore = useLabelsStore() |
| 29 |
labelsStore.initialize() |
| 30 |
|
| 31 |
// Make labels globally available to all components |
| 32 |
app.config.globalProperties.$labels = useLabels() |
| 33 |
|
| 34 |
app.mount('#ivyforms-app') |
| 35 |
|