decord/beta/source/modules/tiny_bronco/TinyBroncoNoticeVisibility.tsx
2026-10-01 14:13:23 +00:00

66 lines
2.9 KiB
TypeScript

// Module ID: 14276
// Function ID: 14277
// Name: TinyBroncoNoticeVisibility
// Dependencies: [1372, 1979, 5735, 5736, 504, 2]
// Exports: shouldShowAgeNotice, useShouldShowAgeNotice, useShouldShowAgeNoticePromo
// Module 14276 (TinyBroncoNoticeVisibility)
import get_initialized from "get initialized" /* 504 */;
import Server from "Server" /* 1979 */;
import RegionalFeatureConfigUtils from "RegionalFeatureConfigUtils" /* 5735 */;
import AgeGatedFeature from "AgeGatedFeature" /* 5736 */;
import UserStore from "UserStore" /* 1372 */;
import size from "module_2" /* 2 */;
const result = size.fileFinishedImporting("modules/tiny_bronco/TinyBroncoNoticeVisibility.tsx");
export const shouldShowAgeNotice = function shouldShowAgeNotice() {
const obj = RegionalFeatureConfigUtils;
let isFeatureAgeGatedResult = obj.isFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
if (isFeatureAgeGatedResult) {
const currentUser = UserStore.getCurrentUser();
let prop;
if (currentUser != null) {
prop = currentUser.ageVerificationStatus;
}
isFeatureAgeGatedResult = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
}
return isFeatureAgeGatedResult;
};
export const useShouldShowAgeNotice = function useShouldShowAgeNotice() {
const obj = RegionalFeatureConfigUtils;
let isFeatureAgeGated = obj.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
const items = [UserStore];
const obj2 = get_initialized;
if (isFeatureAgeGated) {
isFeatureAgeGated = obj2.useStateFromStores(items, () => {
currentUser = currentUser.getCurrentUser();
let prop;
if (currentUser != null) {
prop = currentUser.ageVerificationStatus;
}
const tmp3 = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
return tmp3;
});
}
return isFeatureAgeGated;
};
export const useShouldShowAgeNoticePromo = function useShouldShowAgeNoticePromo() {
const obj = RegionalFeatureConfigUtils;
let isFeatureAgeGated = obj.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
const items = [UserStore];
const obj2 = get_initialized;
if (isFeatureAgeGated) {
isFeatureAgeGated = obj2.useStateFromStores(items, () => {
currentUser = currentUser.getCurrentUser();
let prop;
if (currentUser != null) {
prop = currentUser.ageVerificationStatus;
}
const tmp3 = null != prop && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN && prop !== Server.AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
return tmp3;
});
}
return isFeatureAgeGated;
};