51 lines
3.4 KiB
TypeScript
51 lines
3.4 KiB
TypeScript
/* Metro module 8758; source: modules/user_profile/native/UserProfileFixedBackground.tsx; dependencies: [57, 31, 27, 33, 3868, 8497, 8512, 4589, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as NativeModule from '../../../external/discord_common/js/packages/design/native.tsx'; /* Metro dependency 3868 */
|
|
import * as UseUserProfileColorsModule from '../hooks/native/useUserProfileColors.tsx'; /* Metro dependency 8497 */
|
|
import * as UseUserProfileGradientColorsModule from '../hooks/native/useUserProfileGradientColors.tsx'; /* Metro dependency 8512 */
|
|
|
|
function _fun68543(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8943:6, offset: 0x01c52cbe, size: 195 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactModule;
|
|
value = value.memo(_fun68544);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileFixedBackground.tsx');
|
|
exports.default = value;
|
|
function _fun68544({gradientHeight, bannerHeight, style}) { // fn#68544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8943:174, offset: 0x01c52d81, size: 395 bytes, params: 2, frame: 25
|
|
var Math;
|
|
var min;
|
|
var Math2;
|
|
const {theme, primaryColor, secondaryColor} = (NativeModule).useThemeContext();
|
|
const useUserProfileColors = UseUserProfileColorsModule.useUserProfileColors;
|
|
const gradientFallbackBackground = Reflect.apply(useUserProfileColors, UseUserProfileColorsModule, [{theme: theme,
|
|
primaryColor: primaryColor, secondaryColor: secondaryColor}]).gradientFallbackBackground;
|
|
const value4 = Module00057((UseUserProfileGradientColorsModule).useUserProfileGradientColors(primaryColor,
|
|
secondaryColor, gradientFallbackBackground), 2);
|
|
const property = value4[0];
|
|
if (primaryColor != null) {
|
|
if (secondaryColor != null) {
|
|
Math = global.Math;
|
|
min = Math.min;
|
|
Math2 = global.Math;
|
|
return ((Component) => <Component colors={[property, property, value4[1]]} locations={[0, Reflect.apply(min,
|
|
Math,
|
|
[1, Math2.max(0,
|
|
bannerHeight / gradientHeight)]), 1]} style={[StyleSheet.absoluteFill, style]} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */);
|
|
}
|
|
}
|
|
return (
|
|
<View style={[StyleSheet.absoluteFill, {backgroundColor: gradientFallbackBackground},
|
|
style]} pointerEvents="none" />
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun68543, 8758, [57, 31, 27, 33, 3868, 8497, 8512, 4589,
|
|
2]) /* metro module 8758, dependencies: [57, 31, 27, 33, 3868, 8497, 8512, 4589, 2] */;
|