decord/alpha/source/modules/age_assurance/useAgeGroupPresentation.tsx
github-actions e160b228c5 chore: update source for alpha 348.1
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4942.js (118.4 MB)
2026-09-22 07:41:18 +00:00

62 lines
2.5 KiB
TypeScript

// Module ID: 14998
// Function ID: 14999
// Name: useAgeGroupPresentation
// Dependencies: [1074, 4969, 8686, 2108, 8688, 1115, 2]
// Exports: handleOpenAgeGatedContentArticle, handleShowAgeVerification, useAgeGroupState, useAgeGroupValueLabel
// Module 14998 (useAgeGroupPresentation)
import Constants from "Constants" /* 1074 */;
import HelpdeskUtilsDefault from "HelpdeskUtils" /* 2108 */;
import AgeVerificationUtils from "AgeVerificationUtils" /* 4969 */;
import AgeVerificationActionCreatorsDefault from "AgeVerificationActionCreators" /* 8686 */;
import AgeVerificationAnalyticsUtils from "AgeVerificationAnalyticsUtils" /* 8688 */;
import size from "module_2" /* 2 */;
const HelpdeskArticles = Constants.HelpdeskArticles;
const AgeGroupState = { ADULT: "adult", TEEN: "teen", UNVERIFIED: "unverified" };
let result = size.fileFinishedImporting("modules/age_assurance/useAgeGroupPresentation.tsx");
export { AgeGroupState };
export const useAgeGroupState = function useAgeGroupState() {
const obj = AgeVerificationUtils;
const isAgeVerified = obj.useIsAgeVerified();
if (obj2.useIsVerifiedTeen()) {
let TEEN = tmp2.TEEN;
} else {
TEEN = isAgeVerified ? tmp2.ADULT : tmp2.UNVERIFIED;
}
return TEEN;
};
export const handleOpenAgeGatedContentArticle = function handleOpenAgeGatedContentArticle() {
const obj = AgeVerificationActionCreatorsDefault;
obj.openUrl(HelpdeskUtilsDefault.getArticleURL(HelpdeskArticles.TIGGER_PAWTECT_LEARN_MORE));
};
export const handleShowAgeVerification = function handleShowAgeVerification() {
const obj = AgeVerificationActionCreatorsDefault;
const result = obj.showAgeVerificationGetStartedModal({ entryPoint: AgeVerificationAnalyticsUtils.AgeVerificationModalEntryPoint.ACCOUNT_AGE_GROUP });
};
export const useAgeGroupValueLabel = function useAgeGroupValueLabel() {
const obj = AgeVerificationUtils;
const isAgeVerified = obj.useIsAgeVerified();
if (obj2.useIsVerifiedTeen()) {
let UNVERIFIED = tmp4.TEEN;
let tmp5 = tmp4;
} else if (isAgeVerified) {
UNVERIFIED = tmp4.ADULT;
tmp5 = tmp4;
} else {
UNVERIFIED = tmp4.UNVERIFIED;
tmp5 = tmp4;
}
if (tmp5.ADULT === UNVERIFIED) {
const intl3 = tmp(1115).intl;
return intl3.string(tmp(1115).t.XxRj7f);
} else if (tmp5.TEEN === UNVERIFIED) {
const intl2 = tmp(1115).intl;
return intl2.string(tmp(1115).t.sK0dmH);
} else if (tmp5.UNVERIFIED === UNVERIFIED) {
const intl = tmp(1115).intl;
return intl.string(tmp(1115).t.lKDPGA);
}
obj2 = AgeVerificationUtils;
};