Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.132/page_editor/plugins/browser/components/page-structure/components/item-configuration-panels/ContainerGeneralPanel",["module","exports","require","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../../../../app/components/fragment-configuration-fields/LinkField","../../../../../../app/config/constants/commonStylesRoles","../../../../../../app/config/constants/viewportSizes","../../../../../../app/contexts/StoreContext","../../../../../../app/thunks/updateItemConfig","../../../../../../app/utils/editable-value/isMapped","../../../../../../app/utils/getEditableLinkValue","../../../../../../app/utils/getResponsiveConfig","../../../../../../common/components/Collapse","../../../../../../prop-types/index","./CommonStyles","./ContainerDisplayOptions"],(function(e,t,n){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function({item:e}){const t=(0,l.useDispatch)(),n=(0,l.useSelector)((e=>e.languageId)),[m,y]=(0,o.useState)({}),[b,j]=(0,o.useState)({});(0,o.useEffect)((()=>{y(e.config.link||{}),j((0,c.getEditableLinkValue)(e.config.link,n))}),[e.config.link,n]);const S=(0,l.useSelector)((e=>e.selectedViewportSize)),w=(0,u.getResponsiveConfig)(e.config,S);return o.default.createElement(o.default.Fragment,null,S===i.VIEWPORT_SIZES.desktop&&o.default.createElement("div",{className:"mb-3"},o.default.createElement(f.default,{label:Liferay.Language.get("container-options"),open:!0},o.default.createElement(r.default,{field:{name:"link"},onValueSelect:(o,r)=>{let a;(0,s.default)(r)||(0,s.default)(m)?a={link:r}:(a={link:m},Object.keys(r).length&&(a={link:{href:O(O({},m.href||{}),{},{[n]:r.href}),target:r.target||""}})),t((0,p.default)({itemConfig:a,itemId:e.itemId}))},value:b||{}}),o.default.createElement(g.default,{item:e}))),o.default.createElement(d.CommonStyles,{commonStylesValues:w.styles,item:e,role:a.COMMON_STYLES_ROLES.general}))};y(n("liferay!frontend-js-react-web$prop-types"));var o=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=m();if(t&&t.has(e))return t.get(e);var n={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var a=o?Object.getOwnPropertyDescriptor(e,r):null;a&&(a.get||a.set)?Object.defineProperty(n,r,a):n[r]=e[r]}n.default=e,t&&t.set(e,n);return n}(n("liferay!frontend-js-react-web$react")),r=y(n("../../../../../../app/components/fragment-configuration-fields/LinkField")),a=n("../../../../../../app/config/constants/commonStylesRoles"),i=n("../../../../../../app/config/constants/viewportSizes"),l=n("../../../../../../app/contexts/StoreContext"),p=y(n("../../../../../../app/thunks/updateItemConfig")),s=y(n("../../../../../../app/utils/editable-value/isMapped")),c=n("../../../../../../app/utils/getEditableLinkValue"),u=n("../../../../../../app/utils/getResponsiveConfig"),f=y(n("../../../../../../common/components/Collapse")),d=(n("../../../../../../prop-types/index"),n("./CommonStyles")),g=y(n("./ContainerDisplayOptions"));function m(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return m=function(){return e},e}function y(e){return e&&e.__esModule?e:{default:e}}function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){j(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}}}));
//# sourceMappingURL=ContainerGeneralPanel.js.map