Liferay.Loader.define("data-engine-js-components-web@1.0.79/js/core/components/PageRenderer/DefaultVariant.es",["module","exports","require","@frontend-taglib-clay$clayui/layout","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","../../hooks/useForm.es"],(function(e,a,t){window;{Object.defineProperty(a,"__esModule",{value:!0}),a.Container=f,a.Page=s,a.PageHeader=c,a.Row=m,a.Rows=p,a.Column=void 0;var r=i(t("@frontend-taglib-clay$clayui/layout")),n=i(t("liferay!frontend-js-react-web$classnames")),l=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=o();if(a&&a.has(e))return a.get(e);var t={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=r?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(t,n,l):t[n]=e[n]}t.default=e,a&&a.set(e,t);return t}(t("liferay!frontend-js-react-web$react")),d=t("../../hooks/useForm.es");function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e){return e&&e.__esModule?e:{default:e}}function u(){return(u=Object.assign||function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e}).apply(this,arguments)}const e="com_liferay_dynamic_data_mapping_form_web_portlet_DDMFormAdminPortlet";function f({activePage:e,children:a,isBuilder:t=!0,pageIndex:r}){return l.default.createElement("div",{className:(0,n.default)("fade tab-pane",{"active show":e===r,hide:e!==r}),role:"tabpanel"},t?l.default.createElement("div",{className:"form-builder-layout"},a):a)}f.displayName="DefaultVariant.Container";const y=(0,l.forwardRef)((({children:a,className:t,column:o,columnClassName:i,index:f,onClick:s,onMouseLeave:c,onMouseOver:m,pageIndex:p,rowIndex:y,viewMode:g},v)=>{const{portletId:w}=(0,d.useFormState)(),b=o.fields[0],h="fieldset"===(null==b?void 0:b.type),N=(null==b?void 0:b.ddmStructureId)&&h;return l.default.createElement(r.default.Col,u({},{"data-ddm-field-column":f,"data-ddm-field-page":p,"data-ddm-field-row":y},{className:(0,n.default)("col-ddm",i),key:f,md:o.size,onClick:s,onMouseLeave:c,onMouseOver:m,ref:v}),!!o.fields.length&&l.default.createElement("div",{className:(0,n.default)("ddm-field-container ddm-target h-100",{"ddm-fieldset":!!N,"fields-group":!!h},t),"data-field-name":b.fieldName},o.fields.map(((t,r)=>(g&&w.includes(e)&&(t.predefinedValue=""),"function"==typeof a?a({field:t,index:r}):a)))))}));function s({children:e,forceAriaUpdate:a,header:t,invalidFormMessage:r,pageIndex:n}){return l.default.createElement("div",{className:"active ddm-form-page lfr-ddm-form-page","data-ddm-page":n},r&&l.default.createElement("span",{"aria-atomic":"true","aria-live":"polite",className:"sr-only"},r,l.default.createElement("span",{"aria-hidden":"true"},a)),t,e)}function c({description:e,title:a}){return l.default.createElement(l.default.Fragment,null,a&&l.default.createElement("h2",{className:"lfr-ddm-form-page-title",tabIndex:0},a),e&&l.default.createElement("h3",{className:"lfr-ddm-form-page-description",tabIndex:0},e))}function m({children:e,index:a,row:t}){return l.default.createElement("div",{className:"position-relative row",key:a},t.columns.map(((a,t)=>e({column:a,index:t}))))}function p({children:e,rows:a}){return a?a.map(((a,t)=>l.default.createElement("div",{className:"ddm-row",key:t},e({index:t,row:a})))):null}a.Column=y,y.displayName="DefaultVariant.Column",s.displayName="DefaultVariant.Page",c.displayName="DefaultVariant.PageHeader",m.displayName="DefaultVariant.Row",p.displayName="DefaultVariant.Rows"}}));
//# sourceMappingURL=DefaultVariant.es.js.map