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

73 lines
5.3 KiB
TypeScript

/* Metro module 10393; source: modules/premium/native/gifting/PremiumGiftPlanSelectPromotionalBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 7277, 10390, 4589, 5475, 4573, 1244, 10394, 2] */
function _fun80489(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#80489, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10579:6, offset: 0x01e7d9f1, size: 211 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const value2 = require(33) /* metro dependency 33 */;
const env0_4 = value2.jsx;
const env0_5 = value2.jsxs;
const env0_6 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun80490);
value = value.memo(PremiumGiftPlanSelectPromotionalBanner);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftPlanSelectPromotionalBanner.tsx');
exports.default = value;
}
function _fun80490() { // fn#80490, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10579:172, offset: 0x01e7dac4, size: 272 bytes, params: 1, frame: 15
const object = {'minHeight': 60, 'justifyContent': 'center', 'gap': 2};
let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingTop = PX_12;
PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object.paddingBottom = PX_12;
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.paddingStart = PX_24;
object.paddingEnd = 120;
return {gradient: {minHeight: 60}, bannerImage: {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0,
'width': '100%', 'aspectRatio': 5}, content: object, heading: {}, subheading: {},
logoContainer: {'position': 'absolute', 'top': 0, 'bottom': 0, 'right': 10, 'justifyContent': 'center',
'alignItems': 'center'}, logoContainerLargeTilted: {transform: [{rotate: '-7deg'}, {translateY: 8}]},
logo: {'width': 95, 'height': 95}, logoLargeTilted: {'width': 120, 'height': 120}};
}
function PremiumGiftPlanSelectPromotionalBanner({giftPlanSelectionCardBannerComponent, claimableRewards, isSelected, onLayout}) { // fn#80491, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10579:733, offset: 0x01e7dbd4, size: 763 bytes, params: 2, frame: 34
var r5;
var object8;
var value;
const styles = useStyles();
const gradient = giftPlanSelectionCardBannerComponent.gradient;
const assetVariant = giftPlanSelectionCardBannerComponent.assetVariant;
const GiftPlanSelectionCardBanner_AssetVariant = (require(7277) /* metro dependency 7277: gift_plan_selection_card_banner */).GiftPlanSelectionCardBanner_AssetVariant;
const LARGE_TILTED = GiftPlanSelectionCardBanner_AssetVariant.LARGE_TILTED;
const value3 = assetVariant === LARGE_TILTED;
const value4 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(giftPlanSelectionCardBannerComponent.mobileBannerAsset);
const value5 = (require(10390) /* metro dependency 10390: MarketingComponentHooks */).useThemeAndReducedMotionAwareAssetUrl(giftPlanSelectionCardBannerComponent.avatarAsset,
true);
const defaultImport = importDefault(4589) /* metro dependency 4589 */;
const defaultImportProps2 = {style: styles.gradient, useAngle: true, angle: gradient?.angle ?? 90,
angleCenter: {'x': 0.5, 'y': 0.5}, colors: gradient?.colors ?? [], onLayout: onLayout};
const items2 = [value4 != null && ((Component) => <Component style={styles.bannerImage} resizeMode="cover" source={{uri: value4}} />)(importDefault(5475) /* metro dependency 5475: FastImage */)];
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const OEtqpm = (require(1244) /* metro dependency 1244: indexNative */).t.OEtqpm;
items2[1] = <View style={styles.content}><Text style={styles.heading} variant="text-md/bold" color="white">{Reflect.apply(string,
intl,
[OEtqpm])}</Text><Text style={styles.subheading} variant="text-md/medium" color="white">{intl.formatToPlainString((require(1244) /* metro dependency 1244: indexNative */).t['2h5M+X'],
{availableCount: claimableRewards.length})}</Text></View>;
const value10 = value5 != null;
if (value10) {
var viewProps = {style: [styles.logoContainer, value3 && styles.logoContainerLargeTilted]};
value = importDefault(10394) /* metro dependency 10394: PremiumFeaturesPromotionalLogo */;
value = <View {...viewProps}>{((Component) => <Component shouldAnimate={isSelected} promoRotatingStyle={[styles.logo,
value3 && styles.logoLargeTilted]} rotatingAvatarImageUrl={value5} />)(value)}</View>;
r5 = value;
} else {
r5 = value10;
}
items2[2] = r5;
return ((Component) => <Component {...defaultImportProps2}>{items2}</Component>)(defaultImport);
}