52 lines
2.4 KiB
TypeScript
52 lines
2.4 KiB
TypeScript
// Metro module 6751 (f6752).
|
|
import { useMemo } from "react";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import ModalActionCreators from "../../../actions/ModalActionCreators";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { HeaderActionButton } from "../../../design/components/Navigator/native/HeaderActionButton.native";
|
|
import AgeVerificationIncodeMethodSelectScreen from "./AgeVerificationIncodeMethodSelectScreen";
|
|
import AgeVerificationWebViewScreen from "./AgeVerificationWebViewScreen";
|
|
import { Navigator } from "../../../design/components/Navigator/native/Navigator.native";
|
|
let c4338_5 = {
|
|
METHOD_SELECT: "METHOD_SELECT",
|
|
VERIFY_AGE: "VERIFY_AGE"
|
|
};
|
|
const useStyles = createStyles({
|
|
headerStyle: {
|
|
backgroundColor: Module712.colors.BACKGROUND_BASE_LOWER
|
|
}
|
|
});
|
|
export default function AgeVerificationIncodeModal(props) {
|
|
const { webviewUrl, onComplete, onClose } = props;
|
|
const styles = useStyles();
|
|
const headerTitle = intl.string(t.wJVyYR);
|
|
return <Navigator screens={useMemo(() => {
|
|
let origin;
|
|
const webviewUrl2 = webviewUrl;
|
|
const onComplete2 = onComplete;
|
|
const onClose2 = onClose;
|
|
const handleClose2 = function handleClose() {
|
|
onClose2();
|
|
ModalActionCreators.pop();
|
|
};
|
|
origin = new URL(webviewUrl).origin;
|
|
const r22 = {};
|
|
r22[c4338_5.METHOD_SELECT] = {
|
|
headerStyle: styles.headerStyle,
|
|
headerTitle: intl.string(t.wJVyYR),
|
|
headerLeft: () => <HeaderActionButton onPress={handleClose2} text={intl.string(t.cpT0Cq)} />,
|
|
render: (a0, c25983_0) => <AgeVerificationIncodeMethodSelectScreen onClose={handleClose2} trustedOrigin={origin} onMethodSelected={(event) => c25983_0.navigate(c4338_5.VERIFY_AGE, {
|
|
injectedJavaScriptBeforeContentLoaded: event
|
|
})} />
|
|
};
|
|
r22[c4338_5.VERIFY_AGE] = {
|
|
headerStyle: styles.headerStyle,
|
|
headerTitle,
|
|
headerLeft: () => <HeaderActionButton onPress={handleClose2} text={intl.string(t.cpT0Cq)} />,
|
|
render: (a0) => <AgeVerificationWebViewScreen webviewUrl={webviewUrl2} onComplete={onComplete2} onClose={handleClose2} injectedJavaScriptBeforeContentLoaded={a0.injectedJavaScriptBeforeContentLoaded} />
|
|
};
|
|
return r22;
|
|
}, [styles, webviewUrl, onComplete, onClose, headerTitle])} initialRouteName={c4338_5.METHOD_SELECT} headerBackTitle={intl.string(t["13/7kX"])} />;
|
|
};
|