function onDirtySwitchWarningClose(sAction) {
			if (sAction === MessageBox.Action.CANCEL) {
				return;
			}

			if (sAction === oLibraryBundle.getText("BTN_MODIFIED_VARIANT_SAVE")) {
				var oCompositeCommand;
				this.getCommandFactory().getCommandFor(oTargetElement, "composite")
				.then(function(_oCompositeCommand) {
					oCompositeCommand = _oCompositeCommand;
					return getCommandForSave.call(this, oTargetOverlay);
				}.bind(this))
				.then(function(oSaveCommand) {
					oCompositeCommand.addCommand(oSaveCommand);
					return getCommandForSwitch.call(this, oTargetOverlay, sNewVariantReference, sCurrentVariantReference);
				}.bind(this))
				.then(function(oSwitchCommand) {
					oCompositeCommand.addCommand(oSwitchCommand);
					this.fireElementModified({
						command: oCompositeCommand
					});
				}.bind(this));
			}

			if (sAction === oLibraryBundle.getText("BTN_MODIFIED_VARIANT_DISCARD")) {
				getCommandForSwitch.call(
					this,
					oTargetOverlay,
					sNewVariantReference,
					sCurrentVariantReference,
					true // discard variant content
				)
				.then(function(oSwitchCommand) {
					this.fireElementModified({
						command: oSwitchCommand
					});
				}.bind(this));
			}
		}
Performs a variant switch.

@param {object} oTargetOverlay Target variant management overlay
@param {string} sNewVariantReference The new variant reference
@param {string} sCurrentVariantReference The current variant reference
@public