import{r as m}from"./redux-1.0.74-D8bIc6ki.js";import{a as p}from"./hooks-1.0.74-NYCTWeI9.js";import{aq as d,S as u,l,ar as f,as as A}from"./lib-1.0.74-B5IEqfHg.js";import{u as g}from"./useRemoveAppFromStore-1.0.74-CJatuZ_l.js";const S=()=>{const i=p(),n=g(),c=t=>{const s=d.getSelectors().selectFormState(u.getState().forms,t),a=s==null?void 0:s.details,r=s==null?void 0:s.m2mDetail;if(l.debug(t,a,r),r!==void 0&&Array.isArray(r)){for(let e=0;e<r.length;e++)l.debug(r[e]),n(r[e]);i(f({appId:t}))}if(a!==void 0&&Array.isArray(a))for(let e=0;e<a.length;e++){const o=a[e].appId;l.debug(o,a[e]),c(o),n(o),i(A({appId:t,detailAppId:o}))}};return m.useCallback(t=>{c(t)},[])};export{S as C};
