import { jsx } from "react/jsx-runtime";
import { AbilityContext } from "./ability.context.mjs";
import { createContextualCan } from "@casl/react";
const ContextualCan = createContextualCan(AbilityContext.Consumer);
const Can = ({ use, ...props }) => {
  const [action, subject] = use;
  return /* @__PURE__ */ jsx(ContextualCan, { ...props, do: action, on: subject });
};
export {
  Can
};
