import { jsx as _jsx } from "react/jsx-runtime";
import { EditorWarning } from "../EditorWarning";
import { useEditContext } from "../client/editContext";
export function NoWriteAccess({ item }) {
    var editContext = useEditContext();
    if (!editContext)
        return;
    if (editContext.mode !== "edit")
        return;
    if (!item.canWriteItem) {
        return (_jsx(EditorWarning, { title: "You dont have write access.", severity: "warning", children: _jsx("p", { children: "You can't edit this item because you don't have write access." }) }));
    }
}
//# sourceMappingURL=NoWriteAccess.js.map