Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.179/page_editor/plugins/browser/components/page_structure/components/item_configuration_panels/ContainerGeneralPanel",["module","exports","require","@frontend-taglib-clay$clayui/panel","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","../../../../../../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,p.useDispatch)(),n=(0,p.useSelector)((e=>e.languageId)),[y,b]=(0,a.useState)({}),[m,_]=(0,a.useState)({});(0,a.useEffect)((()=>{b(e.config.link||{}),_((0,s.getEditableLinkValue)(e.config.link,n))}),[e.config.link,n]);const O=(0,p.useSelector)((e=>e.selectedViewportSize)),j=(0,f.getResponsiveConfig)(e.config,O);return a.default.createElement(a.default.Fragment,null,O===l.VIEWPORT_SIZES.desktop&&a.default.createElement("div",{className:"mb-3 panel-group-sm"},a.default.createElement(r.default,{collapsable:!0,defaultExpanded:!0,displayTitle:Liferay.Language.get("container-options"),displayType:"unstyled",showCollapseIcon:!0},a.default.createElement(r.default.Body,null,a.default.createElement(o.default,{field:{name:"link"},onValueSelect:(r,a)=>{let o;(0,c.default)(a)||(0,c.default)(y)?o={link:a}:(o={link:y},Object.keys(a).length&&(o={link:{href:_objectSpread(_objectSpread({},y.href||{}),{},{[n]:a.href}),target:a.target||""}})),t((0,u.default)({itemConfig:o,itemId:e.itemId}))},value:m||{}}),a.default.createElement(g.default,{item:e})))),a.default.createElement(d.CommonStyles,{commonStylesValues:j.styles,item:e,role:i.COMMON_STYLES_ROLES.general}))};var r=_interopRequireDefault(n("@frontend-taglib-clay$clayui/panel")),a=(_interopRequireDefault(n("liferay!frontend-js-react-web$prop-types")),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 a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var o=r?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}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"),l=n("../../../../../../app/config/constants/viewportSizes"),p=n("../../../../../../app/contexts/StoreContext"),u=_interopRequireDefault(n("../../../../../../app/thunks/updateItemConfig")),c=_interopRequireDefault(n("../../../../../../app/utils/editable_value/isMapped")),s=n("../../../../../../app/utils/getEditableLinkValue"),f=n("../../../../../../app/utils/getResponsiveConfig"),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