Liferay.Loader.define("dynamic-data-mapping-form-web@4.0.150/admin/js/components/form-settings/FormSettingsApi",["module","exports","require","data-engine-js-components-web","liferay!frontend-js-react-web$react"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r("data-engine-js-components-web"),o=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 r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(r("liferay!frontend-js-react-web$react"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}const getFielProperty=(e,t)=>{var r;return null===(r=e.find((e=>e.fieldName===t)))||void 0===r?void 0:r.value[0]};var i=o.default.forwardRef(((e,t)=>{const{pages:r}=(0,n.useFormState)();(0,o.useEffect)((()=>{const e="formSettingsAPI";return Liferay.component(e,{reactComponentRef:t},{destroyOnNavigate:!0}),()=>{Liferay.destroyComponent(e)}}),[t]);const i=(0,o.useMemo)((()=>(0,n.getFields)(r)),[r]);return t.current={getFields:()=>i,getObjectDefinitionId:()=>{const e=getFielProperty(i,"storageType"),t=getFielProperty(i,"objectDefinitionId");return"object"===e&&t?t:null}},null}));t.default=i}}));
//# sourceMappingURL=FormSettingsApi.js.map