110 lines
6.4 KiB
TypeScript
110 lines
6.4 KiB
TypeScript
/* Metro module 12158; source: modules/premium/native/gifting/PremiumGiftBackgroundSelectTile.tsx; dependencies: [31, 27, 1880, 12159, 33, 12160, 12161, 12162, 12163, 10527, 12164, 12165, 12166, 12167, 4501, 697, 1244, 2288, 5475, 2] */
|
|
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 PremiumConstantsModule from '../../PremiumConstants.tsx'; /* Metro dependency 1880 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as PremiumGiftingConstantsModule from '../../gifting/PremiumGiftingConstants.tsx'; /* Metro dependency 12159 */
|
|
|
|
function _fun93249(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#93249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12344:6, offset: 0x020ac448, size: 535 bytes, params: 8, frame: 21
|
|
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.Pressable;
|
|
const PremiumGiftStyles = (PremiumConstantsModule).PremiumGiftStyles;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
object = {};
|
|
const STANDARD_BOX = PremiumGiftStyles.STANDARD_BOX;
|
|
object[STANDARD_BOX] = importDefault(12160) /* metro dependency 12160 */;
|
|
const CAKE = PremiumGiftStyles.CAKE;
|
|
object[CAKE] = importDefault(12161) /* metro dependency 12161 */;
|
|
const CHEST = PremiumGiftStyles.CHEST;
|
|
object[CHEST] = importDefault(12162) /* metro dependency 12162 */;
|
|
const COFFEE = PremiumGiftStyles.COFFEE;
|
|
object[COFFEE] = importDefault(12163) /* metro dependency 12163 */;
|
|
const NITROWEEN_STANDARD = PremiumGiftStyles.NITROWEEN_STANDARD;
|
|
object[NITROWEEN_STANDARD] = {uri: importDefault(10527) /* metro dependency 10527: halloweenCardSmallPng */};
|
|
const SNOWGLOBE = PremiumGiftStyles.SNOWGLOBE;
|
|
object[SNOWGLOBE] = null;
|
|
const BOX = PremiumGiftStyles.BOX;
|
|
object[BOX] = null;
|
|
const CUP = PremiumGiftStyles.CUP;
|
|
object[CUP] = null;
|
|
const SEASONAL_CAKE = PremiumGiftStyles.SEASONAL_CAKE;
|
|
object[SEASONAL_CAKE] = {uri: importDefault(12164) /* metro dependency 12164: gift_cakePng */};
|
|
const SEASONAL_CHEST = PremiumGiftStyles.SEASONAL_CHEST;
|
|
object[SEASONAL_CHEST] = {uri: importDefault(12165) /* metro dependency 12165: gift_chestPng */};
|
|
const SEASONAL_COFFEE = PremiumGiftStyles.SEASONAL_COFFEE;
|
|
object[SEASONAL_COFFEE] = {uri: importDefault(12166) /* metro dependency 12166: gift_coffeePng */};
|
|
const SEASONAL_STANDARD_BOX = PremiumGiftStyles.SEASONAL_STANDARD_BOX;
|
|
object[SEASONAL_STANDARD_BOX] = {uri: importDefault(12167) /* metro dependency 12167: gift_boxPng */};
|
|
const env0_9 = (CreateStylesModule).createStyles(_fun93250);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/native/gifting/PremiumGiftBackgroundSelectTile.tsx');
|
|
exports.default = GiftBackgroundSelectTile;
|
|
exports.GIFT_STYLE_IMG = object;
|
|
function _fun93250(a0) { // fn#93250, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12344:559, offset: 0x020ac65f, size: 177 bytes, params: 2, frame: 15
|
|
const object = {};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
const value2 = 0;
|
|
object.container = {'width': 78, 'height': 44, 'justifyContent': 'center', marginEnd: PX_8,
|
|
marginStart: value2 !== a0 ? value2 : 20};
|
|
const object3 = {'position': 'absolute', 'borderColor': null, 'borderRadius': null, 'borderWidth': 2, 'flex': 1,
|
|
'width': 78, 'height': 44};
|
|
const TEXT_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_BRAND;
|
|
object3.borderColor = TEXT_BRAND;
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.sm;
|
|
object.selected = object3;
|
|
object.image = {'width': 72, 'height': 38, 'alignSelf': 'center'};
|
|
return object;
|
|
}
|
|
|
|
function GiftBackgroundSelectTile({index, selected, giftStyle, onPress}) { // fn#93251, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12344:974, offset: 0x020ac710, size: 298 bytes, params: 2, frame: 27
|
|
var r0;
|
|
var object;
|
|
var intl;
|
|
var formatToPlainString;
|
|
var property2;
|
|
var intl2;
|
|
var items2;
|
|
var value;
|
|
const styles = useStyles(index);
|
|
const property = env0_8[giftStyle];
|
|
if (property == null) {
|
|
r0 = null;
|
|
} else {
|
|
object = {};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
formatToPlainString = intl.formatToPlainString;
|
|
property2 = (importDefault(2288) /* metro dependency 2288: PremiumGiftingMessages */)['+utqaz'];
|
|
intl2 = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
object['aria-label'] = Reflect.apply(formatToPlainString, intl, [property2,
|
|
{giftStyle: intl2.string(GIFT_STYLE_DESCRIPTIONS[giftStyle])}]);
|
|
object['aria-selected'] = selected;
|
|
object.style = styles.container;
|
|
object.onPress = onPress;
|
|
items2 = [
|
|
selected && <View style={styles.selected} />,
|
|
];
|
|
value = importDefault(5475) /* metro dependency 5475: FastImage */;
|
|
items2[1] = ((Component) => <Component resizeMode="contain" style={styles.image} source={property} />)(value);
|
|
value = (
|
|
<Pressable {...object}>
|
|
{items2}
|
|
</Pressable>
|
|
);
|
|
r0 = value;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun93249, 12158, [31, 27, 1880, 12159, 33, 12160, 12161, 12162, 12163, 10527, 12164, 12165, 12166,
|
|
12167, 4501, 697, 1244, 2288, 5475,
|
|
2]) /* metro module 12158, dependencies: [31, 27, 1880, 12159, 33, 12160, 12161, 12162, 12163, 10527, 12164, 12165, 12166, 12167, 4501, 697, 1244, 2288, 5475, 2] */;
|