import { jsxDEV, Fragment } from "react/jsx-dev-runtime";
import { useEnvironment } from "@contember/react-binding";
import { memo, useMemo } from "react";
const Variable = memo(({ name, format }) => {
  const environment = useEnvironment();
  const value = environment.getVariableOrElse(name, void 0) ?? environment.getParameter(name);
  const formatted = useMemo(() => format ? format(value) : value, [format, value]);
  return /* @__PURE__ */ jsxDEV(Fragment, { children: formatted }, void 0, false, {
    fileName: "/__w/interface/interface/packages/admin/src/components/bindingFacade/environment/Variable.tsx",
    lineNumber: 15,
    columnNumber: 9
  }, void 0);
});
Variable.displayName = "Variable";
export {
  Variable
};
//# sourceMappingURL=Variable.js.map
