// Metro module 11107 (f11108). import FamilyCenterPendingConnectionStore from "../FamilyCenterPendingConnectionStore"; import { FAMILY_CENTER_LINK_REQUEST_REGEX, FamilyCenterAction } from "../FamilyCenterConstants"; import { AnalyticEvents } from "../../../Constants"; import AnalyticsUtils from "../../../utils/AnalyticsUtils"; import FamilyCenterActionCreators from "../FamilyCenterActionCreators"; import ModalActionCreators from "../../../actions/ModalActionCreators"; let c7500_7 = "family-center-request-modal"; export const FAMILY_CENTER_REQUEST_MODAL_KEY = "family-center-request-modal"; export function handleFamilyCenterQRCodeScan(a0, a1) { const r13 = a0.match(FAMILY_CENTER_LINK_REQUEST_REGEX); if (r13 === null) { return null; } const selected_teen_id = r13[1]; const linkCode = r13[2]; AnalyticsUtils.track(AnalyticEvents.FAMILY_CENTER_ACTION, { action: FamilyCenterAction.ScanQRCode, selected_teen_id, source: a1 }); FamilyCenterActionCreators.setPendingConnection(selected_teen_id, linkCode); ModalActionCreators.pushLazy(import("./FamilyCenterModalRequest"), { userId: selected_teen_id, linkCode }, c7500_7); } export function resumeFamilyCenterConnection() { const pendingConnection = FamilyCenterPendingConnectionStore.getPendingConnection(); let r9 = pendingConnection != null; if (r9) { ModalActionCreators.popWithKey(c7500_7); ModalActionCreators.pushLazy(import("./FamilyCenterModalRequest"), { userId: pendingConnection.teenId, linkCode: pendingConnection.linkCode }, c7500_7); r9 = true; } return r9; }