decord/source/modules/parent_tools/hooks/useSelectedTab.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

32 lines
1.7 KiB
TypeScript

// Module ID: 14900
// Function ID: 14901
// Name: useSelectedTab
// Dependencies: [7551, 7552, 1074, 563, 7553, 1242, 2]
// Exports: default
// Module 14900 (useSelectedTab)
import useStateFromStores from "useStateFromStores" /* 563 */;
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
import FamilyCenterActionCreatorsDefault from "FamilyCenterActionCreators" /* 7553 */;
import FamilyCenterStore from "FamilyCenterStore" /* 7551 */;
require = fn;
const FamilyCenterConstants = fn(7552);
({ FamilyCenterAction: closure_4, FamilyCenterSubPages } = FamilyCenterConstants);
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
const result = size.fileFinishedImporting("modules/parent_tools/hooks/useSelectedTab.tsx");
export default function useSelectedMyFamilyTab() {
let obj = {
selectedTab: null,
handleTabChange(tab) {
tab = FamilyCenterActionCreatorsDefault.selectTab(tab);
AnalyticsUtilsDefault.track(constants.FAMILY_CENTER_ACTION, { action: TabChange.TabChange, tab });
}
};
const items = [FamilyCenterStore];
obj.selectedTab = useStateFromStores.useStateFromStores(items, () => selectedTab.getSelectedTab());
return obj;
};
export const FAMILY_CENTER_TAB_ANALYTICS_LABELS = { [FamilyCenterSubPages.ACTIVITY]: "family_center_activity_tab", [FamilyCenterSubPages.REQUESTS]: "family_center_requests_tab", [FamilyCenterSubPages.SETTINGS]: "family_center_settings_tab", [FamilyCenterSubPages.CONTENT_AND_SOCIAL]: "family_center_content_and_social_panel", [FamilyCenterSubPages.DATA_AND_PRIVACY]: "family_center_data_and_privacy_panel", [FamilyCenterSubPages.SCREEN_TIME_CONTROLS]: "family_center_screen_time_controls_panel" };