import{C as S,b4 as b,S as m,l as _,b6 as A,b7 as C,b8 as F,b9 as h,ba as L,ad as D,bb as R,bc as k,bd as v,be as w}from"./lib-1.0.63-DJZPtMem.js";import{r as M}from"./redux-1.0.63-Df-eBzJn.js";import{g as x}from"./Languages-1.0.63-DsTK0dJK.js";import{a as y}from"./hooks-1.0.63-CWs3kTdT.js";const E=a=>{const e=M.useMemo(()=>{var r,u,g,i,d,c,p,f;const l={language:S.defaultLanguage,translation:void 0,allowFullScreen:!0,safeMode:!1};let s=b.getSelectors().selectMetaDataById(m.getState().metaData,a);const o=(u=(r=s==null?void 0:s.app)==null?void 0:r.app[0])==null?void 0:u.app_settings;if(o!=null&&o!==""){const t=JSON.parse(o);l.language=x((g=t==null?void 0:t.settings)==null?void 0:g.app_language),l.translation=(i=t==null?void 0:t.settings)==null?void 0:i.app_translation}(s==null?void 0:s.appRootId)!==void 0&&(s=b.getSelectors().selectMetaDataById(m.getState().metaData,s.appRootId));const n=(c=(d=s==null?void 0:s.app)==null?void 0:d.app[0])==null?void 0:c.app_settings;if(n!=null&&n!==""){const t=JSON.parse(n);l.allowFullScreen=(p=t==null?void 0:t.settings)==null?void 0:p.app_fullscreen,l.safeMode=(f=t==null?void 0:t.settings)==null?void 0:f.app_safe_mode}return l},[]);return _.debug("appSettings",e),e},j=()=>{const a=y();return M.useCallback(e=>{_.debug(e),a(A({appId:e})),a(C({appId:e})),a(F({appId:e})),a(h({appId:e})),a(L({appId:e})),a(D({appId:e})),a(R({appId:e})),a(k({appId:e})),a(v({appId:e})),a(w({appId:e}))},[])};export{E as a,j as u};
