import { inject, provide, Ref } from 'vue'
import { DrawExpose } from "../../../index";

const actionKey = Symbol('drawAction');
export const installDraw = (drawRef: Ref<DrawExpose | undefined>) => {
	provide(actionKey, drawRef)
}

export const useDraw = () => inject<Ref<DrawExpose>>(actionKey)?.value!
