import { hasInjectionContext, inject } from 'vue'; const headSymbol = "usehead"; // @__NO_SIDE_EFFECTS__ function injectHead() { if (hasInjectionContext()) { const instance = inject(headSymbol); if (instance) return instance; } throw new Error("useHead() was called without provide context, ensure you call it through the setup() function."); } // @__NO_SIDE_EFFECTS__ function vueInstall(head) { const plugin = { install(app) { app.config.globalProperties.$unhead = head; app.config.globalProperties.$head = head; app.provide(headSymbol, head); } }; return plugin.install; } export { headSymbol as h, injectHead as i, vueInstall as v };