Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.169/page_editor/app/components/undo/getActionLabel",["module","exports","require","frontend-js-web","../../../plugins/experience/actions","../../actions/types","../../config/constants/undoTypes","../../config/index","../../utils/getSegmentsExperienceName"],(function(e,a,t){window;Object.defineProperty(a,"__esModule",{value:!0}),a.default=function getActionLabel(e,a,{availableSegmentsExperiences:t}){switch(e.originalType||e.type){case g.ADD_FRAGMENT_ENTRY_LINKS:case g.ADD_ITEM:return(0,n.sub)(Liferay.Language.get("add-x"),e.itemName);case g.CHANGE_MASTER_LAYOUT:return a===r.UNDO_TYPES.undo?(0,n.sub)(Liferay.Language.get("select-x-master-layout"),u.config.masterLayouts.find((a=>a.masterLayoutPlid===e.nextMasterLayoutPlid)).name):(0,n.sub)(Liferay.Language.get("select-x-master-layout"),u.config.masterLayouts.find((a=>a.masterLayoutPlid===e.masterLayoutPlid)).name);case g.DELETE_ITEM:return(0,n.sub)(Liferay.Language.get("delete-x"),e.itemName);case g.DUPLICATE_ITEM:return(0,n.sub)(Liferay.Language.get("duplicate-x"),e.itemName);case g.MOVE_ITEM:return(0,n.sub)(Liferay.Language.get("move-x"),e.itemName);case i.SELECT_SEGMENTS_EXPERIENCE:return a===r.UNDO_TYPES.undo?(0,n.sub)(Liferay.Language.get("select-x-experience"),(0,s.default)(e.nextSegmentsExperienceId,t)):(0,n.sub)(Liferay.Language.get("select-x-experience"),(0,s.default)(e.segmentsExperienceId,t));case g.SWITCH_VIEWPORT_SIZE:return a===r.UNDO_TYPES.undo?(0,n.sub)(Liferay.Language.get("select-x-viewport"),u.config.availableViewportSizes[e.nextSize].label):(0,n.sub)(Liferay.Language.get("select-x-viewport"),u.config.availableViewportSizes[e.size].label);case g.TOGGLE_FRAGMENT_HIGHLIGHTED:return e.initiallyHighlighted?Liferay.Language.get("add-fragment-to-favorites"):Liferay.Language.get("remove-fragment-from-favorites");case g.TOGGLE_WIDGET_HIGHLIGHTED:return e.initiallyHighlighted?Liferay.Language.get("add-widget-to-favorites"):Liferay.Language.get("remove-widget-from-favorites");case g.UPDATE_COL_SIZE:return Liferay.Language.get("update-column-size");case g.UPDATE_COLLECTION_DISPLAY_COLLECTION:case g.UPDATE_FRAGMENT_ENTRY_LINK_CONFIGURATION:case g.UPDATE_FORM_ITEM_CONFIG:case g.UPDATE_ITEM_CONFIG:case g.UPDATE_ROW_COLUMNS:return(0,n.sub)(Liferay.Language.get("update-x-configuration"),e.itemName);case g.UPDATE_EDITABLE_VALUES:return(0,n.sub)(Liferay.Language.get("update-x-editable-values"),e.itemName);case g.UPDATE_LANGUAGE_ID:return a===r.UNDO_TYPES.undo?(0,n.sub)(Liferay.Language.get("select-x-language"),e.nextLanguageId):(0,n.sub)(Liferay.Language.get("select-x-language"),e.languageId)}};var n=t("frontend-js-web"),i=t("../../../plugins/experience/actions"),g=t("../../actions/types"),r=t("../../config/constants/undoTypes"),u=t("../../config/index"),s=function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(t("../../utils/getSegmentsExperienceName"))}));
//# sourceMappingURL=getActionLabel.js.map