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

94 lines
4.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 15314
// Function ID: 15315
2026-07-20 16:05:17 +00:00
// Name: PrivacyPolicyDescription
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 5262, 15276, 676, 21, 4668, 4739, 1236, 4108, 8124, 8122, 15315, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 15314 (PrivacyPolicyDescription)
import noopAll from "noop" /* 19 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import useCheckboxA11yNative from "useCheckboxA11yNative" /* 4108 */;
import Text from "Text" /* 4739 */;
import PromotionalEmailCheckBoxDefault from "PromotionalEmailCheckBox" /* 15315 */;
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import { usePromoEmailConsentStore } from "setPromoEmailConsentState" /* 5262 */;
import { useRegistrationUIStore } from "useRegistrationUIStore" /* 15276 */;
import { MarketingURLs } from "ME" /* 676 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
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 };
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
2026-07-20 16:05:17 +00:00
obj = { termsURL: MarketingURLs.TERMS, privacyURL: MarketingURLs.PRIVACY };
2026-08-24 06:08:38 +00:00
obj[3] = intl.format(getSystemLocale.t["KI+BSb"], obj);
return callback(Text.Text, obj);
2026-07-20 16:05:17 +00:00
}
function PrivacyPolicyCheckbox(onToggleConsent) {
({ consent, asCheckbox } = onToggleConsent);
if (asCheckbox === undefined) {
asCheckbox = false;
}
const tmp = callback3();
2026-08-24 06:08:38 +00:00
let obj = 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;
2026-08-24 06:08:38 +00:00
obj[3] = intl.string(getSystemLocale.t.Y7Kgvf);
2026-07-29 08:29:29 +00:00
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-24 06:08:38 +00:00
let tmp7Result = tmp7(tmp2(8124).FormCheckbox, obj);
2026-07-29 08:29:29 +00:00
let tmp9 = tmp7;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
obj1 = { selected: null };
2026-07-29 08:29:29 +00:00
obj1[0] = consent;
2026-08-24 06:08:38 +00:00
tmp7Result = tmp7(tmp2(8122).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;
2026-08-24 06:08:38 +00:00
obj2[3] = intl2.format(getSystemLocale.t.qMDAP0, { termsURL: MarketingURLs.TERMS, privacyURL: MarketingURLs.PRIVACY });
items[1] = tmp9(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-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ View: c3, Pressable: c4 } = get_ActivityIndicator);
2026-08-24 06:08:38 +00:00
({ jsx: closure_8, jsxs: c9 } = jsxProd);
2026-07-29 08:29:29 +00:00
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-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/auth/native/components/PrivacyHint.tsx");
2026-07-20 16:05:17 +00:00
export default function PrivacyHint(arg0) {
({ 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-24 06:08:38 +00:00
const items = [callback(PromotionalEmailCheckBoxDefault, {}), 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-24 06:08:38 +00:00
items1 = [callback(PromotionalEmailCheckBoxDefault, {}), 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
};