/* Metro module 14070; source: modules/collectibles/native/FeedBlock.tsx; dependencies: [31, 27, 4502, 1310, 5078, 663, 661, 33, 4501, 697, 566, 4002, 14058, 14071, 14049, 5120, 6789, 6771, 1244, 4573, 5278, 4080, 14072, 1962, 4068, 4578, 14062, 14073, 477, 7601, 14074, 5475, 14075, 14076, 2] */ import ThemeStore from '../../user_settings/ThemeStore.tsx'; /* Metro dependency 1310 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import ConsentStore from '../../../stores/ConsentStore.tsx'; /* Metro dependency 5078 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */ 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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */ import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */ import * as ShopHomeSortTypeModule from '../../../external/discord_common/js/shared/shared-constants/ShopHomeSortType.tsx'; /* Metro dependency 14071 */ function _fun106662(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106662, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:6, offset: 0x022e53d2, size: 537 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_4 = value.Image; const env0_5 = value.View; value = require(33) /* metro dependency 33 */; const env0_11 = value.jsx; const env0_12 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.feedContainer = {'display': 'flex', 'flexDirection': 'column', 'height': '100%', gap: PX_16}; const object3 = {'display': 'flex', 'flexDirection': 'row', 'flexWrap': 'wrap', 'justifyContent': 'space-between', 'alignItems': 'center'}; const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object3.gap = PX_12; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object3.paddingHorizontal = PX_16; object.feedHeader = object3; const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8; object.feedTitle = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'flexShrink': 1, gap: PX_8}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.feedFooter = {'display': 'flex', 'gap': null, 'flexDirection': 'column', 'justifyContent': 'center', 'alignItems': 'center', gap: PX_16}; object.feedFooterImage = {'width': '100%', 'resizeMode': 'cover'}; object.feedFooterOrbImage = {'width': '100%', 'alignSelf': 'center', 'resizeMode': 'contain', 'height': 130}; const env0_13 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/FeedBlock.tsx'); exports.default = _default_106663; function _default_106663({feedBlock, screen, preferVCPrice, disableBundleStaticBackground}) { // fn#106663, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14267:911, offset: 0x022e55eb, size: 1576 bytes, params: 2, frame: 41 var r18; var r9; var r13; var r12; var PressableOpacity; var object5; const Button = (ButtonNativeModule).Button; var object2; var object6; var object7; var value; const styles = useStyles(); const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ThemeStore], function() { return require(dependencyMap[11]).isThemeDark(ThemeStore.theme); }); const {feedProducts, isPersonalized} = ReactModule.useMemo(_fun106666, [feedBlock.sortedSkuIds, (importDefault(14058) /* metro dependency 14058: useGetProductsFromSkus */)(), (require(566) /* metro dependency 566: flux */).useStateFromStores([ConsentStore], function() { return ConsentStore.hasConsented(Consents.PERSONALIZATION); })]); const value6 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: feedProducts, maxProducts: 36, screen: screen}); const closure = function() { var moduleValue = require(dependencyMap[15]); var object = {}; var COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON; object.analyticsLocations = [COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON]; object.analyticsSource = importDefault(dependencyMap[16]).COLLECTIBLES_MOBILE_SHOP_ALL_BUTTON; object.screen = CollectiblesMobileShopScreen.SHOP_ALL; moduleValue.openCollectiblesShopMobile(object); }; const ORBS = CollectiblesMobileShopScreen.ORBS; const value7 = screen === ORBS; const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const defaultImport = UseAnalyticsLocations; const COLLECTIBLES_SHOP_POPULAR_PICKS = (AnalyticsLocation).COLLECTIBLES_SHOP_POPULAR_PICKS; const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_POPULAR_PICKS).analyticsLocations; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const r15 = isPersonalized ? Reflect.apply(string, intl, [t.NSv5KV]) : Reflect.apply(string, intl, [t.ivaAA7]); const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider; const Heading = (TextModule).Heading; const heading = ( {r15} ); if (isPersonalized) { PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; object5 = {onPress: onPress_106669, hitSlop: 14}; object5['aria-label'] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.hvVgAZ); r18 = ( {((CircleInformationIcon) => )((require(4068) /* metro dependency 4068: CircleInformationIcon */).CircleInformationIcon)} ); } else { r18 = isPersonalized; } const view = ( {heading} {r18} ); if (value7) { r9 = !value7; } else { r9 = (