decord/source/modules/auth/native/components/PrivacyHint.tsx

98 lines
4.1 KiB
TypeScript
Raw Normal View History

2026-08-08 06:10:11 +00:00
// Module ID: 15119
// Function ID: 15120
2026-07-20 16:05:17 +00:00
// Name: PrivacyPolicyDescription
2026-08-08 06:10:11 +00:00
// Dependencies: [19, 17, 5828, 15081, 676, 21, 4303, 4299, 1236, 4019, 7969, 7967, 15120, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-08 06:10:11 +00:00
// Module 15119 (PrivacyPolicyDescription)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import get_ActivityIndicator from "get ActivityIndicator";
import { usePromoEmailConsentStore } from "setPromoEmailConsentState";
import { useRegistrationUIStore } from "useRegistrationUIStore";
import { MarketingURLs } from "ME";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c3;
let c4;
let c9;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function PrivacyPolicyDescription(style) {
2026-07-29 08:29:29 +00:00
let obj = { style: style.style, variant: "text-xs/medium", color: "text-muted", children: null };
const intl = require(1236) /* getSystemLocale */.intl;
2026-07-20 16:05:17 +00:00
obj = { termsURL: MarketingURLs.TERMS, privacyURL: MarketingURLs.PRIVACY };
2026-07-29 08:29:29 +00:00
obj[3] = intl.format(require(1236) /* getSystemLocale */.t["KI+BSb"], obj);
2026-08-08 06:10:11 +00:00
return callback(require(4299) /* Text */.Text, obj);
2026-07-20 16:05:17 +00:00
}
function PrivacyPolicyCheckbox(onToggleConsent) {
let asCheckbox;
let consent;
({ consent, asCheckbox } = onToggleConsent);
if (asCheckbox === undefined) {
asCheckbox = false;
}
const tmp = callback3();
2026-08-07 06:50:47 +00:00
let obj = require(4019) /* useCheckboxA11yNative */;
2026-07-20 16:05:17 +00:00
const checkboxA11yNative = obj.useCheckboxA11yNative({ checked: consent });
2026-07-29 08:29:29 +00:00
obj = { style: asCheckbox ? tmp.checkbox : tmp.radio, accessibilityState: checkboxA11yNative.accessibilityState, accessibilityRole: checkboxA11yNative.accessibilityRole, accessibilityLabel: null, onPress: null, hitSlop: null, children: null };
const intl = tmp2(1236).intl;
obj[3] = intl.string(require(1236) /* getSystemLocale */.t.Y7Kgvf);
obj[4] = onToggleConsent.onToggleConsent;
obj[5] = { top: 11, bottom: 11, left: 11 };
2026-07-20 16:05:17 +00:00
if (asCheckbox) {
2026-07-29 08:29:29 +00:00
obj = { checked: null };
obj[0] = consent;
2026-08-08 06:10:11 +00:00
let tmp7Result = tmp7(tmp2(7969).FormCheckbox, obj);
2026-07-29 08:29:29 +00:00
let tmp9 = tmp7;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const obj1 = { selected: null };
obj1[0] = consent;
2026-08-08 06:10:11 +00:00
tmp7Result = tmp7(tmp2(7967).FormRow.Radio, obj1);
2026-07-29 08:29:29 +00:00
tmp9 = tmp7;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items = [tmp7Result, ];
const obj2 = { variant: "text-xs/medium", color: "text-muted", style: tmp.checkboxLabel, children: null };
const intl2 = tmp2(1236).intl;
obj2[3] = intl2.format(require(1236) /* getSystemLocale */.t.qMDAP0, { termsURL: MarketingURLs.TERMS, privacyURL: MarketingURLs.PRIVACY });
2026-08-08 06:10:11 +00:00
items[1] = tmp9(require(4299) /* Text */.Text, obj2);
2026-07-29 08:29:29 +00:00
obj[6] = items;
2026-07-20 16:05:17 +00:00
return closure_9(closure_4, obj);
}
2026-07-29 08:29:29 +00:00
({ View: c3, Pressable: c4 } = get_ActivityIndicator);
({ jsx: metroImportAll, jsxs: c9 } = jsxProd);
let closure_10 = createCacheKey.createStyles({ multiItem: { flexDirection: "column", gap: 16 }, checkbox: { flexDirection: "row", alignItems: "flex-start", gap: 8 }, radio: { flexDirection: "row", alignItems: "center", gap: 8 }, checkboxLabel: { flex: 1 } });
2026-07-23 10:11:24 +00:00
const result = require("setPromoEmailConsentState").fileFinishedImporting("modules/auth/native/components/PrivacyHint.tsx");
2026-07-20 16:05:17 +00:00
export default function PrivacyHint(arg0) {
let consent;
let consentRequired;
let onToggleConsent;
({ consent, consentRequired, onToggleConsent } = arg0);
let items1 = callback3();
const tmp2 = useRegistrationUIStore((registrationOptions) => null != registrationOptions.registrationOptions.email) && usePromoEmailConsentStore((required) => required.required);
if (!consentRequired) {
if (tmp2) {
2026-07-29 08:29:29 +00:00
let obj = { style: null, children: null };
obj[0] = items1.multiItem;
2026-08-08 06:10:11 +00:00
const items = [callback(importDefault(15120), {}), callback(PrivacyPolicyDescription, {})];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-20 16:05:17 +00:00
return callback2(closure_3, obj);
}
}
if (!consentRequired) {
if (consentRequired) {
2026-07-29 08:29:29 +00:00
obj = { consent: null, onToggleConsent: null };
obj[0] = consent;
obj[1] = onToggleConsent;
let tmp9Result = tmp9(PrivacyPolicyCheckbox, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp9Result = tmp9(PrivacyPolicyDescription, {});
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
obj = { style: items1.multiItem, children: null };
2026-08-08 06:10:11 +00:00
items1 = [callback(importDefault(15120), {}), callback(PrivacyPolicyCheckbox, { consent, onToggleConsent, asCheckbox: true })];
2026-07-29 08:29:29 +00:00
obj[1] = items1;
tmp9Result = callback2(closure_3, obj);
2026-07-20 16:05:17 +00:00
};