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

const key = Symbol('CONDITION_DROPDOWN_POPUP')

export const useProvideConditionDropdownPopup = (refOrGetter, bottomEleRef, containerEleRef) => {
    const options = {popup: refOrGetter, bottom: bottomEleRef, container: containerEleRef}
    provideLocal(key, options)
    return options
}

export const useInjectConditionDropdownPopup = function () {
    return injectLocal(key)
}