// SPDX-FileCopyrightText: IndieHosters <contact@indiehosters.net>
// SPDX-License-Identifier: AGPL-3.0-or-later

import Vue from 'vue'
import AppMenu from './AppMenu.vue'

Vue.prototype.OC = OC
Vue.prototype.t = OC.L10N.translate

const mountAppMenu = () => {
	const container = document.querySelector('#header .app-menu')

	if (!container) {
		return window.setTimeout(mountAppMenu, 50)
	}

	const View = Vue.extend(AppMenu)
	const App = new View({})

	App.$mount('#header .app-menu')
}

mountAppMenu()
