1 import { getAppFromPathnameSafe } from '@proton/shared/lib/apps/slugHelper';
2 import { VIEWS } from '@proton/shared/lib/calendar/constants';
3 import { getIsAuthorizedApp } from '@proton/shared/lib/drawer/helpers';
4 import { getIsIframe } from '@proton/shared/lib/helpers/browser';
6 // We need to capture the pathname on page load. We otherwise end up in a situation where a side-effect overrides
7 // the pathname, and we have no mechanism to detect the parent app due to cross origin restrictions
8 const pathname = window.location.pathname;
9 const isIframe = getIsIframe();
10 const parentApp = getAppFromPathnameSafe(pathname);
11 const isDrawerApp = isIframe && parentApp && getIsAuthorizedApp(parentApp);
13 if (parentApp === 'proton-mail') {
16 if (parentApp === 'proton-drive') {
23 /** Infos related to calendar in "drawer app" mode */
24 export const embeddedDrawerAppInfos = {