Files
discord-decomp/sources/modules/user_profile/useProfileThemeValues.native.tsx
T
2026-07-27 16:20:00 +03:00

80 lines
4.7 KiB
TypeScript

/* Metro module 6791; source: modules/user_profile/useProfileThemeValues.native.tsx; dependencies: [31, 4502, 632, 1357, 697, 696, 2] */
function _fun53469(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#53469, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6969:6, offset: 0x0134c628, size: 137 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = (require(31) /* metro dependency 31 */).useMemo;
const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/user_profile/useProfileThemeValues.native.tsx');
exports.useProfileThemeValues = function(a0) {
var env0_0 = a0;
var value2 = require(dependencyMap[2]).useStateFromStores([AccessibilityStore], _fun53471);
var env0_1 = value2;
var value3 = importDefault(dependencyMap[3])('useProfileThemeValues');
var env0_2 = value3;
return useMemo(_fun53472, [a0, value2, value3]);
};
}
function useProfileThemeValues(a0) { // fn#53470, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6969:235, offset: 0x0134c6b1, size: 128 bytes, params: 2, frame: 18
const env0_0 = a0;
const useStateFromStoresModule = require(632) /* metro dependency 632: useStateFromStores */;
const useStateFromStores = useStateFromStoresModule.useStateFromStores;
let items2 = [AccessibilityStore];
items2 = [a0, Reflect.apply(useStateFromStores, useStateFromStoresModule, [items2, function() {
return AccessibilityStore.saturation;
}]), (importDefault(1357) /* metro dependency 1357: MobileVisualRefreshExperiment */)('useProfileThemeValues')];
return useMemo(_fun53472, items2);
}
function _fun53472() { // fn#53472, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6969:371, offset: 0x0134c740, size: 447 bytes, params: 1, frame: 24
var r4;
var binding2;
if (env0_0 == null) {
return null;
}
const object3 = {};
let binding = env0_0;
object3.theme = binding;
object3.saturation = saturation;
const object4 = {};
let internal = (importDefault(697) /* metro dependency 697: native */).internal;
let resolveSemanticColor = internal.resolveSemanticColor;
let colors = (importDefault(697) /* metro dependency 697: native */).colors;
const PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME = colors.PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME;
object4.overlaySyncedWithUserTheme = Reflect.apply(resolveSemanticColor, internal, [binding,
PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME, object3]);
internal = (importDefault(697) /* metro dependency 697: native */).internal;
resolveSemanticColor = internal.resolveSemanticColor;
const PROFILE_GRADIENT_OVERLAY = (importDefault(697) /* metro dependency 697: native */).colors.PROFILE_GRADIENT_OVERLAY;
object4.overlay = Reflect.apply(resolveSemanticColor, internal, [binding, PROFILE_GRADIENT_OVERLAY, object3]);
const shimsNativeModule = require(696) /* metro dependency 696: shimsNative */;
let getThemes = shimsNativeModule.getThemes;
const LIGHT = Reflect.apply(getThemes, shimsNativeModule, []).LIGHT;
if (binding === LIGHT) {
r4 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.OPACITY_WHITE_24;
} else {
internal = (importDefault(697) /* metro dependency 697: native */).internal;
resolveSemanticColor = internal.resolveSemanticColor;
binding = env0_0;
binding2 = env0_2;
colors = (importDefault(697) /* metro dependency 697: native */).colors;
r4 = binding2 ? colors.BACKGROUND_MOD_SUBTLE : colors.BACKGROUND_MOD_NORMAL;
r4 = Reflect.apply(resolveSemanticColor, internal, [binding, r4, object3]);
}
object4.sectionBox = r4;
binding = env0_0;
const moduleValue2 = shimsNativeModule;
getThemes = moduleValue2.getThemes;
const DARK = Reflect.apply(getThemes, moduleValue2, []).DARK;
object4.dividerOpacity = binding !== DARK ? 0.12 : 0.24;
internal = (importDefault(697) /* metro dependency 697: native */).internal;
resolveSemanticColor = internal.resolveSemanticColor;
binding = env0_0;
const PROFILE_GRADIENT_ROLE_PILL_BACKGROUND = (importDefault(697) /* metro dependency 697: native */).colors.PROFILE_GRADIENT_ROLE_PILL_BACKGROUND;
object4.rolePillBackgroundColor = Reflect.apply(resolveSemanticColor, internal, [binding,
PROFILE_GRADIENT_ROLE_PILL_BACKGROUND, object3]);
return object4;
}