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