Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.174/page_editor/app/config/index",["module","exports","require","./constants/layoutTypes"],(function(t,e,n){window;{Object.defineProperty(e,"__esModule",{value:!0}),e.initializeConfig=function initializeConfig(n){if(!n.layoutType)return e.config=r=_objectSpread({},n),r;const{commonStyles:o,layoutType:c,pluginsRootPath:i,portletNamespace:l,sidebarPanels:s}=n,d="".concat(l).concat(t.toolbarId),u=function augmentPanelData(t,e){return e.map((e=>{if(isSeparator(e)||e.isLink)return e;const n=a[e.sidebarPanelId]||e.sidebarPanelId;return _objectSpread(_objectSpread({},e),{},{pluginEntryPoint:"".concat(t,"/").concat(n,"/index"),sidebarPanelId:n})}))}(i,s),p={commonStyles:getCommonStyles(o),commonStylesFields:getCommonStylesFields(o),panels:generatePanels(u),sidebarPanels:(b=u,b.reduce(((t,e)=>{const{sidebarPanelId:n}=e;return isSeparator(e)||(t[n]=e),t}),{})),toolbarId:d,toolbarPlugins:getToolbarPlugins(c,i,d)};var b;return e.config=r=_objectSpread(_objectSpread(_objectSpread({},t),n),p),r},e.config=void 0;var o=n("./constants/layoutTypes");function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach((function(e){_defineProperty(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function _defineProperty(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const t={toolbarId:"pageEditorToolbar"};let r=t;e.config=r;const a={};function generatePanels(t){return t.reduce(((t,e)=>(isSeparator(e)?t.push([]):t[t.length-1].push(e.sidebarPanelId),t)),[[]])}function getCommonStyles(t){return t.map((t=>_objectSpread(_objectSpread({},t),{},{styles:t.styles.map((t=>_objectSpread(_objectSpread({},t),{},{responsive:!0})))})))}function getCommonStylesFields(t){const e={};return Object.values(t).forEach((t=>{t.styles.forEach((t=>{e[t.name]={cssTemplate:t.cssTemplate,defaultValue:t.defaultValue}}))})),e}function getToolbarPlugins(t,e,n){const r="".concat(n,"_").concat("experience");return t===o.LAYOUT_TYPES.content?[{loadingPlaceholder:'\n\t\t\t<div class="page-editor__toolbar-experience">\n\t\t\t\t<label class="d-lg-block d-none mr-2" for="'.concat(r,'">\n\t\t\t\t\tExperience\n\t\t\t\t</label>\n\t\t\t\t<button class="form-control-select pr-4 text-left text-truncate btn btn-sm btn-secondary"\n\t\t\t\t\ttype="button" \n\t\t\t\t\tid="').concat(r,'"\n\t\t\t\t\tdisabled>\n\t\t\t\t\t<div class="autofit-row autofit-row-center">\n\t\t\t\t\t\t<div class="autofit-col autofit-col-expand">\n\t\t\t\t\t\t\t<span class="text-truncate">Default</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="autofit-col"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t'),pluginEntryPoint:"".concat(e,"/experience/index"),toolbarPluginId:"experience"}]:[]}function isSeparator(t){return"separator"===t.sidebarPanelId}}}));
//# sourceMappingURL=index.js.map