import {useUserStorePageFilter} from "@/hooks/useUserStorePageFilter";
import {injectLocal, provideLocal} from "@vueuse/core";

const injectKey = Symbol('PAGE_CONFIG')

export const useProvidePageConfig = function (pageName) {
    const pageConfig = useUserStorePageFilter(pageName)
    provideLocal(injectKey, pageConfig)
    return pageConfig
}

export const useInjectPageConfig = function () {
    return injectLocal(injectKey)
}
