109 lines
6.6 KiB
TypeScript
109 lines
6.6 KiB
TypeScript
/* Metro module 13231; source: modules/user_profile/native/UserProfileUpsellCard.tsx; dependencies: [31, 27, 6816, 7047, 33, 4501, 697, 1305, 7954, 4573, 4589, 676, 2] */
|
|
import LinearGradient from '../../../by-id/module-04589-LinearGradient.js'; /* Metro dependency 4589 */
|
|
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 ConstantsIOSModule from '../../../ConstantsIOS.tsx'; /* Metro dependency 676 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as ConstantsModule from './Constants.tsx'; /* Metro dependency 6816 */
|
|
import * as ColorConstantsModule from '../../colors/native/ColorConstants.tsx'; /* Metro dependency 7047 */
|
|
import * as NitroWheelIconModule from '../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
|
|
|
|
function _fun100914(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#100914, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:6, offset: 0x021ffec5, size: 421 bytes, params: 8, frame: 24
|
|
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.ScrollView;
|
|
const PROFILE_SIDE_PADDING = (ConstantsModule).PROFILE_SIDE_PADDING;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const object2 = {'marginTop': 8, 'flexShrink': 0, 'borderRadius': null, 'gap': 4};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
object.upsellButton = object2;
|
|
object.titleContainer = {'flexDirection': 'row', 'alignItems': 'center', 'gap': 4, 'marginBottom': 4};
|
|
object.linearGradient = {'width': '100%', 'height': '100%', 'position': 'absolute', 'overflow': 'hidden'};
|
|
object.outer = {marginHorizontal: PROFILE_SIDE_PADDING - 1};
|
|
const object4 = {};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object.scroll = object4;
|
|
object.inner = {'paddingVertical': 12, 'paddingHorizontal': 14};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileUpsellCard.tsx');
|
|
exports.default = UserProfileUpsellCard;
|
|
function UserProfileUpsellCard({style, children, ctaText, headerText, showLinearGradient, onPress}) { // fn#100915, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:750, offset: 0x0220006a, size: 544 bytes, params: 2, frame: 36
|
|
const styles = useStyles();
|
|
const GradientBorder = (NativeModule).GradientBorder;
|
|
const items2 = [styles.outer, style];
|
|
const GradientBorder2 = (NativeModule).GradientBorder;
|
|
const Direction = GradientBorder2.Direction;
|
|
const HORIZONTAL = Direction.HORIZONTAL;
|
|
const PREMIUM_TIER_2 = Gradients.PREMIUM_TIER_2;
|
|
const lg = (importDefault(697) /* metro dependency 697: native */).radii.lg;
|
|
const r10 = (
|
|
headerText != null
|
|
? (
|
|
<View style={styles.titleContainer}>
|
|
{((NitroWheelIcon) => <NitroWheelIcon color={(importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY} size="xs" />)((require(7954) /* metro dependency 7954: NitroWheelIcon */).NitroWheelIcon)}
|
|
{((Text) => <Text variant="heading-sm/bold">{headerText}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
|
|
</View>
|
|
)
|
|
: null
|
|
);
|
|
const ShinyButton = (NativeModule).ShinyButton;
|
|
const ButtonColors = (NativeModule).ButtonColors;
|
|
const GREEN = ButtonColors.GREEN;
|
|
return (
|
|
<GradientBorder
|
|
borderWidth={1}
|
|
style={items2}
|
|
direction={HORIZONTAL}
|
|
colors={PREMIUM_TIER_2}
|
|
borderRadius={lg}
|
|
>
|
|
<ScrollView
|
|
bounces={false}
|
|
style={styles.scroll}
|
|
contentContainerStyle={styles.inner}
|
|
>
|
|
{r10}
|
|
{children}
|
|
<ShinyButton
|
|
style={styles.upsellButton}
|
|
onPress={onPress}
|
|
text={ctaText}
|
|
color={GREEN}
|
|
renderIcon={renderIcon_100916}
|
|
renderLinearGradient={showLinearGradient ? _fun100917 : undefined}
|
|
/>
|
|
</ScrollView>
|
|
</GradientBorder>
|
|
);
|
|
function UserProfileUpsellCardRenderIcon() { // fn#100916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:1423, owner: UserProfileUpsellCard.renderIcon, offset: 0x0220028a, size: 57 bytes, params: 1, frame: 13
|
|
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
|
|
return <NitroWheelIcon color="white" size="xs" />;
|
|
}
|
|
|
|
function _fun100917() { // fn#100917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13421:1502, offset: 0x022002c3, size: 135 bytes, params: 1, frame: 18
|
|
const defaultImport = LinearGradient;
|
|
const items2 = [styles.linearGradient];
|
|
const {START, END} = (ConstantsIOSModule).HorizontalGradient;
|
|
const PREMIUM_TIER_2_TRI_COLOR = Gradients.PREMIUM_TIER_2_TRI_COLOR;
|
|
return ((Component) => <Component style={items2} start={START} end={END} colors={PREMIUM_TIER_2_TRI_COLOR} />)(defaultImport);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun100914, 13231, [31, 27, 6816, 7047, 33, 4501, 697, 1305, 7954, 4573, 4589, 676,
|
|
2]) /* metro module 13231, dependencies: [31, 27, 6816, 7047, 33, 4501, 697, 1305, 7954, 4573, 4589, 676, 2] */;
|