87 lines
5.7 KiB
TypeScript
87 lines
5.7 KiB
TypeScript
/* Metro module 6791; source: modules/user_profile/useProfileThemeValues.native.tsx; dependencies: [31, 4502, 632, 1357, 697, 696, 2] */
|
|
import AccessibilityStore from '../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as UseStateFromStoresModule from '../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
|
|
import * as ShimsNativeModule from '../../external/discord_common/js/packages/tokens/shims.native.tsx'; /* Metro dependency 696 */
|
|
|
|
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});
|
|
(FileImportTrackerModule).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 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 _fun53471() { // fn#53471, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6969:307, offset: 0x0134c731, size: 15 bytes, params: 1, frame: 1
|
|
return AccessibilityStore.saturation;
|
|
}
|
|
|
|
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 object = {};
|
|
let binding = env0_0;
|
|
object.theme = binding;
|
|
object.saturation = saturation;
|
|
const object2 = {};
|
|
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;
|
|
object2.overlaySyncedWithUserTheme = Reflect.apply(resolveSemanticColor, internal, [binding,
|
|
PROFILE_GRADIENT_OVERLAY_SYNCED_WITH_USER_THEME, object]);
|
|
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;
|
|
object2.overlay = Reflect.apply(resolveSemanticColor, internal, [binding, PROFILE_GRADIENT_OVERLAY, object]);
|
|
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, object]);
|
|
}
|
|
object2.sectionBox = r4;
|
|
binding = env0_0;
|
|
getThemes = ShimsNativeModule.getThemes;
|
|
const DARK = Reflect.apply(getThemes, ShimsNativeModule, []).DARK;
|
|
object2.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;
|
|
object2.rolePillBackgroundColor = Reflect.apply(resolveSemanticColor, internal, [binding,
|
|
PROFILE_GRADIENT_ROLE_PILL_BACKGROUND, object]);
|
|
return object2;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun53469, 6791, [31, 4502, 632, 1357, 697, 696,
|
|
2]) /* metro module 6791, dependencies: [31, 4502, 632, 1357, 697, 696, 2] */;
|