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