/**
 * Updates IsSuspended in a list of adaptable objects
 *
 * @param abObjectToChange object to suspend
 * @param list list of ab objects
 */
export function changeIsSuspendInList(abObjectToChange, list, IsSuspended) {
    return list.map((abObject) => {
        if (!abObject.IsReadOnly && abObject?.Uuid === abObjectToChange?.Uuid) {
            return {
                ...abObject,
                IsSuspended: IsSuspended,
            };
        }
        return abObject;
    });
}
export function suspendAllInList(list) {
    return list.map((abObject) => {
        if (!abObject.IsReadOnly) {
            return {
                ...abObject,
                IsSuspended: true,
            };
        }
        return abObject;
    });
}
export function unsuspendAllInList(list) {
    return list.map((abObject) => {
        if (!abObject.IsReadOnly) {
            return {
                ...abObject,
                IsSuspended: false,
            };
        }
        return abObject;
    });
}
