import{r as m}from"./redux-1.0.63-Df-eBzJn.js";import{a as u,u as c}from"./hooks-1.0.63-CWs3kTdT.js";import{b5 as p,S as f,l as d,bf as g,bg as A}from"./lib-1.0.63-DJZPtMem.js";import{u as D}from"./useRemoveAppFromStore-1.0.63-DNpeLtWd.js";import"./cm-1.0.63-CSIRHMXC.js";import{D as b}from"./DynamicModeEnum-1.0.63-BXuL5kgA.js";const M=()=>{const i=u(),r=D(),l=e=>{const t=p.getSelectors().selectFormState(f.getState().forms,e),a=t==null?void 0:t.details,o=t==null?void 0:t.m2mDetail;if(d.debug(e,a,o),o!==void 0&&Array.isArray(o)){for(let s=0;s<o.length;s++)d.debug(o[s]),r(o[s]);i(g({appId:e}))}if(a!==void 0&&Array.isArray(a))for(let s=0;s<a.length;s++){const n=a[s].appId;d.debug(n,a[s]),l(n),r(n),i(A({appId:e,detailAppId:n}))}};return m.useCallback(e=>{l(e)},[])},x=({details:i,mode:r})=>r===b.FORM?"Form Builder":"Table Builder",E=i=>{const r=c(l=>{var e,t;return(t=(e=l.forms[i])==null?void 0:e.state)==null?void 0:t.details});return d.debug("details",r),r};export{x as B,M as C,E as u};
