decord/alpha/source/modules/badges/BadgeDirectoryUpdatesExperiment.tsx
2026-10-12 06:59:38 +00:00

57 lines
2.3 KiB
TypeScript

// Module ID: 10574
// Function ID: 10575
// Name: BadgeDirectoryUpdatesExperiment
// Dependencies: [1453, 558, 576, 2]
// Module 10574 (BadgeDirectoryUpdatesExperiment)
import react from "react" /* 576 */;
import ApexExperiment from "ApexExperiment" /* 1453 */;
import ReactCompilerGating_mod from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
let obj = { name: "2026-10-badge-directory-updates", kind: "user", defaultConfig: { enabled: false, swipeBetweenBadges: false }, variations: { 0: { enabled: false, swipeBetweenBadges: false }, 1: { enabled: true, swipeBetweenBadges: false }, 2: { enabled: true, swipeBetweenBadges: true } } };
let closure_2 = ApexExperiment.createApexExperiment(obj);
let ReactCompilerGating = ReactCompilerGating_mod;
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsBadgeDirectoryUpdatesEnabled(location) {
let tmp2;
const obj = react;
const cResult = obj.c(2);
const _location = location.location;
if (cResult[0] !== _location) {
const obj2 = { location: _location };
cResult[0] = _location;
cResult[1] = obj2;
tmp2 = obj2;
} else {
tmp2 = cResult[1];
}
return closure_2.useConfig(tmp2).enabled;
}) : (function useIsBadgeDirectoryUpdatesEnabled(location) {
const obj = { location: location.location };
return closure_2.useConfig(obj).enabled;
});
ReactCompilerGating = ReactCompilerGating_mod;
const tmp3 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsBadgeDetailsSwipeEnabled(location) {
let tmp2;
const obj = react;
const cResult = obj.c(2);
const _location = location.location;
if (cResult[0] !== _location) {
const obj2 = { location: _location };
cResult[0] = _location;
cResult[1] = obj2;
tmp2 = obj2;
} else {
tmp2 = cResult[1];
}
const config = closure_2.useConfig(tmp2);
return config.enabled && config.swipeBetweenBadges;
}) : (function useIsBadgeDetailsSwipeEnabled(location) {
const obj = { location: location.location };
const config = closure_2.useConfig(obj);
return config.enabled && config.swipeBetweenBadges;
});
const result = size.fileFinishedImporting("modules/badges/BadgeDirectoryUpdatesExperiment.tsx");
export const useIsBadgeDirectoryUpdatesEnabled = tmp2;
export const useIsBadgeDetailsSwipeEnabled = tmp3;