decord/alpha/source/modules/age_gate/NsfwServerInviteWarningVariant.tsx
github-actions c6aa9eb120 chore: update source for alpha 349.3
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/05xxx/module_5030.js (118.4 MB)
2026-10-01 06:55:13 +00:00

46 lines
2 KiB
TypeScript

// Module ID: 9429
// Function ID: 9430
// Name: NsfwServerInviteWarningVariant
// Dependencies: [9430, 1115, 9431, 5057, 2]
// Exports: getNsfwServerInviteWarningVariant, useGatedAgeGroup
// Module 9429 (NsfwServerInviteWarningVariant)
import util from "util" /* 1115 */;
import AgeVerificationUtils from "AgeVerificationUtils" /* 5057 */;
import getTinyBroncoWarningDescriptions from "getTinyBroncoWarningDescriptions" /* 9430 */;
import useAgeGroupPresentation from "useAgeGroupPresentation" /* 9431 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/age_gate/NsfwServerInviteWarningVariant.tsx");
export const getNsfwServerInviteWarningVariant = function getNsfwServerInviteWarningVariant(arg0) {
const tmp3 = getTinyBroncoWarningDescriptions.getTinyBroncoServerDescriptions()[arg0];
const obj2 = { text: null, joins: false };
const intl = util.intl;
obj2.text = intl.string(util.t.FDSSia);
if (useAgeGroupPresentation.AgeGroupState.ADULT === arg0) {
const obj3 = { description: tmp3, confirm: null, goBackIsPrimary: false };
const obj4 = { text: null, joins: true };
const intl2 = tmp(1115).intl;
obj4.text = intl2.string(tmp(1115).t.wVq7uo);
obj3.confirm = obj4;
return obj3;
} else if (tmp(9431).AgeGroupState.TEEN === arg0) {
const obj5 = { description: tmp3, confirm: obj2, goBackIsPrimary: true };
return obj5;
} else if (tmp(9431).AgeGroupState.UNVERIFIED === arg0) {
const obj6 = { description: tmp3, confirm: obj2, goBackIsPrimary: false };
return obj6;
}
};
export const useGatedAgeGroup = function useGatedAgeGroup() {
const isVerifiedTeen = AgeVerificationUtils.useIsVerifiedTeen();
const isVerifiedAdult = AgeVerificationUtils.useIsVerifiedAdult();
const AgeGroupState = useAgeGroupPresentation.AgeGroupState;
if (isVerifiedTeen) {
let TEEN = AgeGroupState.TEEN;
} else {
TEEN = isVerifiedAdult ? AgeGroupState.ADULT : AgeGroupState.UNVERIFIED;
}
return TEEN;
};