Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4973.js (118.4 MB)
76 lines
3 KiB
TypeScript
76 lines
3 KiB
TypeScript
// Module ID: 15021
|
|
// Function ID: 15022
|
|
// Name: TinyBroncoNoticeVisibility
|
|
// Dependencies: [1372, 1978, 5672, 5673, 504, 2]
|
|
// Exports: shouldShowAgeNotice, useShouldShowAgeNotice, useShouldShowAgeNoticePromo
|
|
|
|
// Module 15021 (TinyBroncoNoticeVisibility)
|
|
import Server from "Server" /* 1978 */;
|
|
import RegionalFeatureConfigUtils from "RegionalFeatureConfigUtils" /* 5672 */;
|
|
import AgeGatedFeature from "AgeGatedFeature" /* 5673 */;
|
|
import UserStore from "UserStore" /* 1372 */;
|
|
|
|
require = fn;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/tiny_bronco/TinyBroncoNoticeVisibility.tsx");
|
|
|
|
export const shouldShowAgeNotice = function shouldShowAgeNotice() {
|
|
let isFeatureAgeGatedResult = RegionalFeatureConfigUtils.isFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
if (isFeatureAgeGatedResult) {
|
|
const currentUser = UserStore.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
isFeatureAgeGatedResult = null != prop && prop !== tmp(1978).AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== tmp(1978).AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
const tmp8 = null != prop && prop !== tmp(1978).AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT && prop !== tmp(1978).AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
}
|
|
return isFeatureAgeGatedResult;
|
|
};
|
|
export const useShouldShowAgeNotice = function useShouldShowAgeNotice() {
|
|
let isFeatureAgeGated = RegionalFeatureConfigUtils.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
const items = [UserStore];
|
|
if (isFeatureAgeGated) {
|
|
isFeatureAgeGated = obj2.useStateFromStores(items, () => {
|
|
currentUser = currentUser.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
let tmp3 = null != prop;
|
|
if (tmp3) {
|
|
tmp3 = prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
}
|
|
if (tmp3) {
|
|
tmp3 = prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
}
|
|
return tmp3;
|
|
});
|
|
}
|
|
return isFeatureAgeGated;
|
|
};
|
|
export const useShouldShowAgeNoticePromo = function useShouldShowAgeNoticePromo() {
|
|
let isFeatureAgeGated = RegionalFeatureConfigUtils.useIsFeatureAgeGated(AgeGatedFeature.AgeGatedFeature.NOTICE);
|
|
const items = [UserStore];
|
|
if (isFeatureAgeGated) {
|
|
isFeatureAgeGated = obj2.useStateFromStores(items, () => {
|
|
currentUser = currentUser.getCurrentUser();
|
|
let prop;
|
|
if (currentUser != null) {
|
|
prop = currentUser.ageVerificationStatus;
|
|
}
|
|
let tmp3 = null != prop;
|
|
if (tmp3) {
|
|
tmp3 = prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_ADULT;
|
|
}
|
|
if (tmp3) {
|
|
tmp3 = prop !== Server.AgeVerificationStatusUkAndAusOnly.VERIFIED_TEEN;
|
|
}
|
|
if (tmp3) {
|
|
tmp3 = prop !== Server.AgeVerificationStatusUkAndAusOnly.INFERRED_ADULT;
|
|
}
|
|
return tmp3;
|
|
});
|
|
}
|
|
return isFeatureAgeGated;
|
|
};
|