Files
discord-decomp/sources/design/components/ExpressiveGradient/native/ExpressiveGradient.native.tsx
T
2026-07-28 01:06:53 +03:00

86 lines
5.4 KiB
TypeScript

/* Metro module 8564; source: design/components/ExpressiveGradient/native/ExpressiveGradient.native.tsx; dependencies: [31, 27, 33, 697, 3860, 674, 4589, 2] */
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 UseTokenModule from '../../../tokens/native/useToken.tsx'; /* Metro dependency 3860 */
function _fun67823(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67823, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8749:6, offset: 0x01c33107, size: 581 bytes, params: 8, frame: 20
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = ReactNativeModule;
const env0_3 = value.View;
const env0_4 = value.StyleSheet;
value = require(33) /* metro dependency 33 */;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
object = {};
const object2 = {};
const EXPRESSIVE_GRADIENT_PURPLE_START = (Native).colors.EXPRESSIVE_GRADIENT_PURPLE_START;
object2.start = EXPRESSIVE_GRADIENT_PURPLE_START;
const EXPRESSIVE_GRADIENT_PURPLE_END = (Native).colors.EXPRESSIVE_GRADIENT_PURPLE_END;
object2.end = EXPRESSIVE_GRADIENT_PURPLE_END;
object.purple = object2;
const object3 = {};
const EXPRESSIVE_GRADIENT_BLUE_START = (Native).colors.EXPRESSIVE_GRADIENT_BLUE_START;
object3.start = EXPRESSIVE_GRADIENT_BLUE_START;
const EXPRESSIVE_GRADIENT_BLUE_END = (Native).colors.EXPRESSIVE_GRADIENT_BLUE_END;
object3.end = EXPRESSIVE_GRADIENT_BLUE_END;
object.blue = object3;
const object4 = {};
const EXPRESSIVE_GRADIENT_GREEN_START = (Native).colors.EXPRESSIVE_GRADIENT_GREEN_START;
object4.start = EXPRESSIVE_GRADIENT_GREEN_START;
const EXPRESSIVE_GRADIENT_GREEN_END = (Native).colors.EXPRESSIVE_GRADIENT_GREEN_END;
object4.end = EXPRESSIVE_GRADIENT_GREEN_END;
object.green = object4;
const object5 = {};
const EXPRESSIVE_GRADIENT_PINK_START = (Native).colors.EXPRESSIVE_GRADIENT_PINK_START;
object5.start = EXPRESSIVE_GRADIENT_PINK_START;
const EXPRESSIVE_GRADIENT_PINK_END = (Native).colors.EXPRESSIVE_GRADIENT_PINK_END;
object5.end = EXPRESSIVE_GRADIENT_PINK_END;
object.pink = object5;
const object6 = {};
const EXPRESSIVE_GRADIENT_NITRO_PINK_START = (Native).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_START;
object6.start = EXPRESSIVE_GRADIENT_NITRO_PINK_START;
const EXPRESSIVE_GRADIENT_NITRO_PINK_END = (Native).colors.EXPRESSIVE_GRADIENT_NITRO_PINK_END;
object6.end = EXPRESSIVE_GRADIENT_NITRO_PINK_END;
object['nitro-pink'] = object6;
const object7 = {};
const EXPRESSIVE_GRADIENT_NITRO_GREEN_START = (Native).colors.EXPRESSIVE_GRADIENT_NITRO_GREEN_START;
object7.start = EXPRESSIVE_GRADIENT_NITRO_GREEN_START;
const EXPRESSIVE_GRADIENT_NITRO_GREEN_END = (Native).colors.EXPRESSIVE_GRADIENT_NITRO_GREEN_END;
object7.end = EXPRESSIVE_GRADIENT_NITRO_GREEN_END;
object['nitro-green'] = object7;
const env0_8 = {'x': 0, 'y': 0.5};
const env0_9 = {'x': 1, 'y': 0.5};
const env0_10 = {'x': 0.5, 'y': 0};
const env0_11 = {'x': 0.5, 'y': 0.5};
(FileImportTrackerModule).fileFinishedImporting('design/components/ExpressiveGradient/native/ExpressiveGradient.native.tsx');
exports.ExpressiveGradient = ExpressiveGradient;
function ExpressiveGradient({color, offsetBottom, backgroundColor, children, style}) { // fn#67824, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8749:1044, offset: 0x01c3334c, size: 510 bytes, params: 2, frame: 28
color = color === undefined ? 'purple' : color;
offsetBottom = offsetBottom === undefined ? 0 : offsetBottom;
const r6 = typeof color !== 'object' ? env0_7[color ?? 'purple'] : color ?? env0_7[color ?? 'purple'];
const value7 = (UseTokenModule).useToken(r6.start);
const value8 = (UseTokenModule).useToken(r6.end);
const value9 = (UseTokenModule).useToken(backgroundColor);
return (
<View style={[StyleSheet.absoluteFill, style]}>
<View style={[StyleSheet.absoluteFill, offsetBottom > 0 ? {bottom: 100 * offsetBottom + '%'} : undefined]}>
{((Component) => <Component style={StyleSheet.absoluteFillObject} colors={[value7,
value8]} start={env0_8} end={env0_9} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */)}
{((Component) => <Component style={StyleSheet.absoluteFillObject} colors={[(importDefault(674) /* metro dependency 674 */)(value9).alpha(0).css(),
value9]} start={env0_10} end={env0_11} pointerEvents="none" />)(importDefault(4589) /* metro dependency 4589 */)}
</View>
{children}
</View>
);
}
}
global.__d(_fun67823, 8564, [31, 27, 33, 697, 3860, 674, 4589,
2]) /* metro module 8564, dependencies: [31, 27, 33, 697, 3860, 674, 4589, 2] */;