import type { Ref } from 'vue';

import type { IFormConfig, IFormDesignMethods } from '../types';

import { inject } from 'vue';

/**
 * 获取formDesign状态
 */
export function useFormDesignState() {
  const formConfig = inject('formConfig') as Ref<IFormConfig>;
  const formDesignMethods = inject('formDesignMethods') as IFormDesignMethods;
  return { formConfig, formDesignMethods };
}
