import { jsx } from "react/jsx-runtime";
import { observer, use$ as useSelector } from "../../_vendor/@legendapp/state/react.js";
import { BlockErrorTv } from "./tv.js";
import { coreStore$ } from "../../stores/core-store.js";
const BlockError = observer(function BlockError2(props) {
  const { children } = props;
  const error = useSelector(coreStore$.error);
  const tv = BlockErrorTv();
  if (!error) return null;
  return /* @__PURE__ */ jsx("div", { className: tv.root(), children: /* @__PURE__ */ jsx("div", { className: tv.message(), children: children?.(error) }) });
});
export {
  BlockError
};
//# sourceMappingURL=block-error.js.map
