import{C as w,az as M,S as F,l as A,aA as b,aB as h,aC as P,aD as L,aE as B,a1 as D,aF as N,aG as O,aH as R,aI as k,aJ as v}from"./lib-1.0.74-B5IEqfHg.js";import{r as C}from"./redux-1.0.74-D8bIc6ki.js";import{g as x}from"./Languages-1.0.74-DaJcF5OJ.js";import{a as y}from"./hooks-1.0.74-NYCTWeI9.js";const H=t=>{const e=C.useMemo(()=>{var r,u,p,i,g,d,c,f,_,m,S;const l={language:w.defaultLanguage,translation:void 0,allowFullScreen:!0,safeMode:!1};let a=M.getSelectors().selectMetaDataById(F.getState().metaData,t);const o=(u=(r=a==null?void 0:a.app)==null?void 0:r.app[0])==null?void 0:u.app_settings;if(o!=null&&o!==""){const s=JSON.parse(o);l.language=x((p=s==null?void 0:s.settings)==null?void 0:p.app_language),l.translation=(i=s==null?void 0:s.settings)==null?void 0:i.app_translation}(a==null?void 0:a.appRootId)!==void 0&&(a=M.getSelectors().selectMetaDataById(F.getState().metaData,a.appRootId));const n=(d=(g=a==null?void 0:a.app)==null?void 0:g.app[0])==null?void 0:d.app_settings;if(n!=null&&n!==""){const s=JSON.parse(n);l.allowFullScreen=(c=s==null?void 0:s.settings)==null?void 0:c.app_fullscreen,((m=window.PP_APP_CONFIG[(_=(f=a==null?void 0:a.app)==null?void 0:f.app[0])==null?void 0:_.app_id])==null?void 0:m.appPwa)===!0&&(l.allowFullScreen=!1),l.safeMode=(S=s==null?void 0:s.settings)==null?void 0:S.app_safe_mode}return l},[]);return A.debug("appSettings",e),e},j=()=>{const t=y();return C.useCallback(e=>{A.debug(e),t(b({appId:e})),t(h({appId:e})),t(P({appId:e})),t(L({appId:e})),t(B({appId:e})),t(D({appId:e})),t(N({appId:e})),t(O({appId:e})),t(R({appId:e})),t(k({appId:e})),t(v({appId:e}))},[])};export{H as a,j as u};
