import { computed, inject, provide } from "vue";
import { handleCheckInfo } from "./permission.mjs";
function useSize(props) {
  const xeSizeInfo = inject("xeSizeInfo", null);
  const computeSize = computed(() => {
    return props.size || (xeSizeInfo ? xeSizeInfo.value : null);
  });
  provide("xeSizeInfo", computeSize);
  return { computeSize };
}
function usePermission(props) {
  const computePermissionInfo = computed(() => {
    return handleCheckInfo(props.permissionCode, props.permissionMethod);
  });
  return {
    computePermissionInfo
  };
}
const useFns = {
  useSize,
  usePermission
};
export {
  useFns,
  usePermission,
  useSize
};
