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

const key = Symbol('VOLUNTARY_STEP')

export const useProvideVoluntaryStep = (t = '志愿填报', step = 0) => {
    const title = ref(t)
    const currentStep = ref(step)

    const options = {
        title,
        currentStep
    }
    provideLocal(key, options)
    return options
}

export const useInjectVoluntaryStep = () => {
    return injectLocal(key)
}