'use strict';
import { createError } from '../../../fd-toolbox/errors/errors.js';
import { metaErrorMessages } from '../../meta/constants/meta-error-messages-constants.js';
import { isUserInRole } from './user-role.js';

var __defProp=Object['defineProperty'],__name=(_0x27f03d,_0x1d7f07)=>__defProp(_0x27f03d,'name',{'value':_0x1d7f07,'configurable':!![]});async function checkOnlyAdminAllowedToEdit(_0x4aae93,_0x40727d){const _0x25f734=await isUserInRole(_0x40727d);if(_0x25f734){const _0x346e20=await isUserInRole(_0x4aae93);!_0x346e20&&createError(metaErrorMessages['onlyAdminsAreAllowedToEditAdmins']);}}__name(checkOnlyAdminAllowedToEdit,'checkOnlyAdminAllowedToEdit');

export { checkOnlyAdminAllowedToEdit };
