Liferay.Loader.define("@liferay/layout-content-page-editor-web@3.0.156/page_editor/app/utils/useHasRequiredChild",["module","exports","require","liferay!frontend-js-react-web$react","../contexts/GlobalContext","../contexts/StoreContext","../selectors/selectFormConfiguration","../services/FormService","./cache","./hasRequiredInputChild","./hasVisibleSubmitChild","./useCache"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=function useHasRequiredChild(e){const t=(0,l.useGlobalContext)(),r=(0,i.useSelectorRef)((e=>e.layoutData)),f=(0,i.useSelectorRef)((e=>e.fragmentEntryLinks)),C=(0,i.useSelectorCallback)((t=>{var r;return(0,o.default)(null===(r=t.layoutData)||void 0===r?void 0:r.items[e],t.layoutData)}),[e]),{classNameId:m,classTypeId:p}=C,h=(0,d.default)({fetcher:()=>u.default.getFormFields({classNameId:m,classTypeId:p}),key:[s.CACHE_KEYS.formFields,m,p]});return(0,a.useCallback)((()=>!!h&&((0,c.default)(e,t)||(0,n.default)({formFields:h,fragmentEntryLinks:f.current,itemId:e,layoutData:r.current}))),[h,r,f,e,t])};var a=r("liferay!frontend-js-react-web$react"),l=r("../contexts/GlobalContext"),i=r("../contexts/StoreContext"),o=_interopRequireDefault(r("../selectors/selectFormConfiguration")),u=_interopRequireDefault(r("../services/FormService")),s=r("./cache"),n=_interopRequireDefault(r("./hasRequiredInputChild")),c=_interopRequireDefault(r("./hasVisibleSubmitChild")),d=_interopRequireDefault(r("./useCache"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}}}));
//# sourceMappingURL=useHasRequiredChild.js.map