async function getToolbarButtonsVisibility(oRootControl, sLayer, oSerializer) {
		const bIsPublishAvailable = await FeaturesAPI.isPublishAvailable();
		const bIsSaveAsAvailable = await RtaAppVariantFeature.isSaveAsAvailable(oRootControl, sLayer, oSerializer);
		const bIsContextBasedAdaptationAvailable = await FeaturesAPI.isContextBasedAdaptationAvailable(sLayer);
		const oAppLifeCycleService = await FlexUtils.getUShellService("AppLifeCycle");
		const bIsHomePage = oAppLifeCycleService?.getCurrentApplication()?.homePage || false;

		return {
			publishAvailable: bIsPublishAvailable,
			saveAsAvailable: !bIsHomePage && bIsPublishAvailable && bIsSaveAsAvailable,
			contextBasedAdaptationAvailable: !bIsHomePage && bIsContextBasedAdaptationAvailable
		};
	}
Checks the publish button, draft buttons(activate and delete) and app variant support (i.e.
Save As and Overview of App Variants) availability. The publish button shall not be available
if the system is productive and if a merge error occurred during merging changes into the view on startup
The app variant support shall not be available if the system is productive and if the platform is not enabled
(See Feature.js) to show the app variant tooling.
The app variant support shall also not be available if the current app is a home page
isProductiveSystem should only return true if it is a test or development system with the provision of custom catalog extensions

@param {object} oRootControl - Root control instance
@param {sap.ui.fl.Layer} sLayer - Active layer
@param {sap.ui.rta.command.LREPSerializer} oSerializer - LREP Serializer
@returns {Promise<map>} with publishAvailable, publishAppVariantSupported and draftAvailable values