import { inject, provide } from 'vue';
import { UpdateCenter } from './useUpdateCenter';

const key = Symbol('visual-board-content');

type Instance = UpdateCenter;

export function createVisualBoardContext(instance: Instance) {
  provide(key, instance);
}

export function useVisualBoardContext() {
  return inject(key) as Instance;
}
