Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.130/page_editor/plugins/browser/components/page-structure/components/item-configuration-panels/MappingPanel",["module","exports","require","liferay!frontend-js-react-web$react","../../../../../../app/config/constants/backgroundImageFragmentEntryProcessor","../../../../../../app/config/constants/editableFragmentEntryProcessor","../../../../../../app/config/constants/editableTypes","../../../../../../app/contexts/CollectionItemContext","../../../../../../app/contexts/StoreContext","../../../../../../app/selectors/selectEditableValue","../../../../../../app/thunks/updateEditableValues","../../../../../../app/utils/editable-value/isMapped","../../../../../../common/components/MappingSelector","../../../../../../prop-types/index"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.MappingPanel=function({item:e}){const t=(0,l.useCollectionConfig)(),{editableId:n,fragmentEntryLinkId:f,type:g}=e,m=(0,c.useDispatch)(),y=(0,c.useSelector)((e=>e)),E=y.fragmentEntryLinks[f],O=g===p.EDITABLE_TYPES.backgroundImage?r.BACKGROUND_IMAGE_FRAGMENT_ENTRY_PROCESSOR:o.EDITABLE_FRAGMENT_ENTRY_PROCESSOR,P=(0,i.default)(y,f,n,O);return a.default.createElement(a.default.Fragment,null,t&&a.default.createElement("p",{className:"page-editor__mapping-panel__helper text-secondary"},Liferay.Language.get("collection-mapping-help")),a.default.createElement(d.default,{fieldType:g,mappedItem:P,onMappingSelect:e=>{const t=b(b({},E.editableValues),{},{[O]:b(b({},E.editableValues[O]),{},{[n]:b({config:(0,u.default)(e)?b(b({},P.config),{},{alt:"",imageTitle:""}):P.config,defaultValue:P.defaultValue},e)})});m((0,s.default)({editableValues:t,fragmentEntryLinkId:f}))}}))};var a=f(n("liferay!frontend-js-react-web$react")),r=n("../../../../../../app/config/constants/backgroundImageFragmentEntryProcessor"),o=n("../../../../../../app/config/constants/editableFragmentEntryProcessor"),p=n("../../../../../../app/config/constants/editableTypes"),l=n("../../../../../../app/contexts/CollectionItemContext"),c=n("../../../../../../app/contexts/StoreContext"),i=f(n("../../../../../../app/selectors/selectEditableValue")),s=f(n("../../../../../../app/thunks/updateEditableValues")),u=f(n("../../../../../../app/utils/editable-value/isMapped")),d=f(n("../../../../../../common/components/MappingSelector"));n("../../../../../../prop-types/index");function f(e){return e&&e.__esModule?e:{default:e}}function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){m(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function m(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=MappingPanel.js.map