diff options
Diffstat (limited to 'node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js')
| -rw-r--r-- | node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js b/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js new file mode 100644 index 0000000..13b7f6d --- /dev/null +++ b/node_modules/@jet-app/app-store/tmp/src/common/web-navigation/web-navigation.js @@ -0,0 +1,28 @@ +import { createPlatformSelectors } from "./platform-selection"; +import { createLandingPageLinks } from "./landing-page-links-by-platform"; +import { makeWebSearchAction } from "../search/web-search-action"; +/** + * Create a {@linkcode WebNavigation} based on the active {@linkcode Intent} + */ +export function createWebNavigation(objectGraph, platform) { + const webNavigation = { + platforms: [], + tabs: [], + searchAction: makeWebSearchAction(objectGraph, platform), + }; + setActivePlatform(objectGraph, webNavigation, platform); + return webNavigation; +} +/** + * Updates a {@linkcode WebNavigation} to reflect: + * + * 1. the platform specified by {@linkcode platform} + * 2. the "active landing page" specified by {@linkcode intent} + */ +export function setActivePlatform(objectGraph, shelf, platform, intent) { + shelf.platforms = createPlatformSelectors(objectGraph, platform); + const searchActionDestination = shelf.searchAction.destination; + shelf.tabs = createLandingPageLinks(objectGraph, platform, intent); + searchActionDestination.platform = platform; +} +//# sourceMappingURL=web-navigation.js.map
\ No newline at end of file |
