"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxDevRuntime = require("react/jsx-dev-runtime");
const reactBinding = require("@contember/react-binding");
const react = require("react");
const Variable = react.memo(({ name, format }) => {
  const environment = reactBinding.useEnvironment();
  const value = environment.getVariableOrElse(name, void 0) ?? environment.getParameter(name);
  const formatted = react.useMemo(() => format ? format(value) : value, [format, value]);
  return /* @__PURE__ */ jsxDevRuntime.jsxDEV(jsxDevRuntime.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";
exports.Variable = Variable;
//# sourceMappingURL=Variable.cjs.map
