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