import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { useEditContext } from "./client/editContext";
export function EditorWarnings({ item }) {
    var context = useEditContext();
    if (!context || context.mode === "preview")
        return;
    if (!item) {
        item = context.page?.item;
    }
    if (!item)
        return;
    return (_jsx("div", { className: "z-50 w-full", children: context.configuration.editorWarnings.map((x, i) => React.createElement(x, {
            item,
            key: "warning" + i,
            editContext: context,
        })) }));
}
//# sourceMappingURL=EditorWarnings.js.map