decord/source/modules/safety_flows/native/SafetyFlowsModal.tsx

125 lines
3.6 KiB
TypeScript
Raw Normal View History

2026-07-31 08:44:05 +00:00
// Module ID: 16729
// Function ID: 16730
2026-07-20 16:05:17 +00:00
// Name: SafetyFlowsModal
2026-07-31 08:44:05 +00:00
// Dependencies: [32, 19, 21, 5574, 16726, 16730, 16734, 5147, 16736, 16738, 16739, 16740, 16741, 16746, 16732, 16731, 13236, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-31 08:44:05 +00:00
// Module 16729 (SafetyFlowsModal)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
const require = arg1;
const result = require("jsxProd").fileFinishedImporting("modules/safety_flows/native/SafetyFlowsModal.tsx");
2026-07-20 16:05:17 +00:00
export default function SafetyFlowsModal(initialRouteName) {
2026-07-29 08:29:29 +00:00
let first;
let closure_1;
2026-07-20 16:05:17 +00:00
const tmp = callback(React.useState(initialRouteName.task), 2);
2026-07-29 08:29:29 +00:00
first = tmp[0];
closure_1 = tmp[1];
2026-07-31 08:44:05 +00:00
let obj = first(5574);
2026-07-23 10:11:24 +00:00
let items = [first];
2026-07-29 08:29:29 +00:00
const navigatorScreens = obj.useNavigatorScreens(() => {
obj = { [closure_0(closure_2[4]).SafetyFlowScreens.OVERVIEW]: obj, [closure_0(closure_2[4]).SafetyFlowScreens.ENTER_EMAIL]: obj };
obj = {
headerLeft() {
return null;
},
headerShown: false,
render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16730), {});
2026-07-29 08:29:29 +00:00
}
};
obj = {
headerLeft() {
return null;
},
headerTitle() {
return null;
},
render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16734), {});
2026-07-29 08:29:29 +00:00
}
};
const obj1 = { headerLeft: null, headerTitle: null, render: null };
2026-07-31 08:44:05 +00:00
obj1[0] = first(5147).getHeaderBackButton();
2026-07-29 08:29:29 +00:00
obj1[1] = function headerTitle() {
return null;
};
obj1[2] = function render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16736), {});
2026-07-29 08:29:29 +00:00
};
2026-07-31 08:44:05 +00:00
obj[first(16726).SafetyFlowScreens.VERIFY_EMAIL] = obj1;
obj[first(16726).SafetyFlowScreens.UPDATE_APP] = {
2026-07-29 08:29:29 +00:00
headerLeft() {
return null;
},
headerTitle() {
return null;
},
render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16738), {});
2026-07-29 08:29:29 +00:00
}
};
2026-07-31 08:44:05 +00:00
obj[first(16726).SafetyFlowScreens.AGE_VERIFICATION] = {
2026-07-29 08:29:29 +00:00
headerLeft() {
return null;
},
headerTitle() {
return null;
},
render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16739), {});
2026-07-29 08:29:29 +00:00
}
};
2026-07-31 08:44:05 +00:00
obj[first(16726).SafetyFlowScreens.PARENTAL_CONSENT_CONNECTION] = {
2026-07-29 08:29:29 +00:00
headerShown: false,
customNavbar() {
2026-07-31 08:44:05 +00:00
return callback3(callback(16740).ParentalConsentConnectionNavbar, {});
2026-07-29 08:29:29 +00:00
},
render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16741), {});
2026-07-29 08:29:29 +00:00
}
};
2026-07-31 08:44:05 +00:00
obj[first(16726).SafetyFlowScreens.ERROR] = {
2026-07-29 08:29:29 +00:00
headerLeft() {
return null;
},
headerTitle() {
return null;
},
render() {
2026-07-31 08:44:05 +00:00
return callback3(callback2(16746), {});
2026-07-29 08:29:29 +00:00
}
};
return obj;
}, []);
2026-07-20 16:05:17 +00:00
const items1 = [first];
const memo = React.useMemo(() => {
let flow_context;
2026-07-29 08:29:29 +00:00
if (first != null) {
flow_context = tmp.flow_context;
2026-07-20 16:05:17 +00:00
}
if (null == flow_context) {
return [];
} else {
2026-07-29 08:29:29 +00:00
const tasks = tmp.flow_context.tasks;
2026-07-20 16:05:17 +00:00
if (1 === tasks.length) {
2026-07-23 10:11:24 +00:00
if (tasks[0].task_type === first(outer1_2[4]).TaskType.PARENTAL_CONSENT_CONNECTION) {
2026-07-20 16:05:17 +00:00
let items = [];
}
return items;
}
2026-07-29 08:29:29 +00:00
const tasks1 = tmp.flow_context.tasks;
const mapped = tasks1.map((task_type) => callback(table[14]).getScreensForTaskType(task_type.task_type));
2026-07-20 16:05:17 +00:00
const found = mapped.filter((arg0) => null != arg0);
items = found.flat();
}
}, items);
const memo1 = React.useMemo(() => ({ task: first, setTask: closure_1 }), items1);
2026-07-29 08:29:29 +00:00
obj = { value: memo1, children: null };
2026-07-31 08:44:05 +00:00
obj[1] = jsx(first(13236).StepModal, { initialRouteName: initialRouteName.initialScreen, screens: navigatorScreens, steps: memo });
return jsx(first(16731).SafetyFlowTaskContext.Provider, { value: memo1, children: null });
2026-07-20 16:05:17 +00:00
};