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