Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/app/components/layout_data_items/Row",["module","exports","require","@frontend-taglib-clay$clayui/layout","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../../common/hooks/useId","../../../prop_types/index","../../config/constants/layoutDataItemTypes","../../contexts/CollectionItemContext","../../contexts/StoreContext","../../utils/getLayoutDataItemClassName","../../utils/getLayoutDataItemCssClasses","../../utils/getLayoutDataItemUniqueClassName","../../utils/getResponsiveConfig","../../utils/useBackgroundImageValue"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/layout")),o=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),n=(_interopRequireDefault(a("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 a={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var n=r?Object.getOwnPropertyDescriptor(e,o):null;n&&(n.get||n.set)?Object.defineProperty(a,o,n):a[o]=e[o]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react"))),u=a("../../../common/hooks/useId"),l=(a("../../../prop_types/index"),a("../../config/constants/layoutDataItemTypes")),i=a("../../contexts/CollectionItemContext"),s=a("../../contexts/StoreContext"),c=_interopRequireDefault(a("../../utils/getLayoutDataItemClassName")),d=_interopRequireDefault(a("../../utils/getLayoutDataItemCssClasses")),f=_interopRequireDefault(a("../../utils/getLayoutDataItemUniqueClassName")),m=a("../../utils/getResponsiveConfig"),p=_interopRequireDefault(a("../../utils/useBackgroundImageValue"));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 getItemParent(e,t){const a=t.items[e.parentId];return!a||a.type!==l.LAYOUT_DATA_ITEM_TYPES.root&&a.type!==l.LAYOUT_DATA_ITEM_TYPES.fragmentDropZone?a:getItemParent(a,t)}var y=n.default.forwardRef((({children:e,className:t,item:a},l)=>{const y=(0,s.useSelector)((e=>e.selectedViewportSize)),g=(0,m.getResponsiveConfig)(a.config,y),{modulesPerRow:_,reverseOrder:I}=g,{backgroundImage:C}=g.styles,D=(0,u.useId)(),b=(0,i.useGetFieldValue)(),v=(0,p.default)(D,C,b),R={};v.url&&(R["--lfr-background-image-".concat(a.itemId)]="url(".concat(v.url,")"),(null==C?void 0:C.fileEntryId)&&(R["--background-image-file-entry-id"]=C.fileEntryId));const w=n.default.createElement("div",{className:(0,o.default)((0,c.default)(a.type),(0,d.default)(a),(0,f.default)(a.itemId))},n.default.createElement(r.default.Row,{className:(0,o.default)(t,{"flex-column-reverse":2===a.config.numberOfColumns&&1===_&&I,"no-gutters":!a.config.gutters}),id:D,ref:l,style:R},v.mediaQueries?n.default.createElement("style",null,v.mediaQueries):null,e)),q=(0,s.useSelector)((e=>{var t;return null===(t=e.masterLayout)||void 0===t?void 0:t.masterLayoutData})),j=(0,n.useMemo)((()=>{const e=q&&q.items[q.rootItems.dropZone];return e?getItemParent(e,q):void 0}),[q]);return(0,s.useSelector)((e=>!getItemParent(a,e.layoutData)&&!j))?n.default.createElement(r.default.ContainerFluid,{className:"p-0",size:!1},w):w}));t.default=y}}));
//# sourceMappingURL=Row.js.map