"use strict";
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const jsxRuntime = require("react/jsx-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__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: formatted });
});
Variable.displayName = "Variable";
exports.Variable = Variable;
//# sourceMappingURL=Variable.cjs.map
