import { inject, provide, type InjectionKey } from 'vue' import { useConfigStore } from '@/store/configStore' export interface AboutUsPageContext { config: ReturnType } export const ABOUT_US_PAGE_CONTEXT_KEY: InjectionKey = Symbol('aboutUsPageContext') export function useAboutUsPage() { const config = useConfigStore() const context: AboutUsPageContext = { config, } provide(ABOUT_US_PAGE_CONTEXT_KEY, context) return context } export function useAboutUsPageContext() { const context = inject(ABOUT_US_PAGE_CONTEXT_KEY) if (!context) { throw new Error('useAboutUsPageContext must be used within a page that calls useAboutUsPage()') } return context }