import { jsxDEV } from "react/jsx-dev-runtime";
import { createContext, useContext, useCallback } from "react";
import { useEnvironment } from "@contember/binding";
const LabelMiddlewareContext = createContext((it) => it);
const useLabelMiddleware = () => {
  const env = useEnvironment();
  const labelMiddleware = useContext(LabelMiddlewareContext);
  return useCallback((it) => labelMiddleware(it, env), [env, labelMiddleware]);
};
const LabelMiddlewareProvider = ({ value, children }) => {
  return /* @__PURE__ */ jsxDEV(LabelMiddlewareContext.Provider, { value, children }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/environment/LabelMiddleware.tsx",
    lineNumber: 16,
    columnNumber: 3
  }, globalThis);
};
export {
  LabelMiddlewareContext,
  LabelMiddlewareProvider,
  useLabelMiddleware
};
//# sourceMappingURL=LabelMiddleware.js.map
