/* Metro module 14078; source: modules/collectibles/native/ShelfBlock.tsx; dependencies: [31, 27, 5121, 663, 661, 33, 4501, 697, 1484, 10023, 14057, 6771, 6789, 566, 14058, 14049, 5120, 10020, 4573, 4578, 1244, 6517, 8416, 2] */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import CollectiblesCategoryStore from '../CollectiblesCategoryStore.tsx'; /* Metro dependency 5121 */ import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */ import CollectiblesShopCardV2 from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */ import UseGetProductsFromSkus from '../hooks/useGetProductsFromSkus.tsx'; /* Metro dependency 14058 */ 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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */ import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */ import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as LayerScopeNativeModule from '../../../design/components/Layers/native/LayerScope.native.tsx'; /* Metro dependency 6517 */ import * as UseAnalyticsLocationsModule from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */ import * as FlashListModule from '../../../external/discord_common/js/packages/flash-list/index.jsx'; /* Metro dependency 8416 */ import * as CollectiblesShopCardV2Module from './CollectiblesShopCardV2.tsx'; /* Metro dependency 10020 */ import * as CollectiblesAnalyticsContextModule from '../CollectiblesAnalyticsContext.tsx'; /* Metro dependency 10023 */ import * as UseFilteredAndSortedProductsModule from './hooks/useFilteredAndSortedProducts.tsx'; /* Metro dependency 14049 */ import * as CollectiblesCoachmarkScrollDismissContextModule from './CollectiblesCoachmarkScrollDismissContext.tsx'; /* Metro dependency 14057 */ function _fun106686(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#106686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:6, offset: 0x022e6904, size: 634 bytes, params: 8, frame: 23 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_9 = value.jsx; const env0_10 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const object2 = {width: '100%'}; let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.paddingTop = PX_16; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object2.paddingBottom = PX_16; object.container = object2; const object3 = {}; let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24; object3.marginTop = PX_24; PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24; object3.paddingTop = PX_24; PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24; object3.paddingBottom = PX_24; object3.overflow = 'hidden'; object.containerWithBackground = object3; object.backgroundImage = {'position': 'absolute', 'top': 0, 'left': 0, 'bottom': 0, 'minWidth': '100%', 'aspectRatio': 2.5, 'resizeMode': 'cover'}; const object4 = {'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'space-between'}; let PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object4.gap = PX_12; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object4.paddingHorizontal = PX_16; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object4.marginBottom = PX_16; object4.zIndex = 1; object.header = object4; object.headingWrapper = {flexShrink: 1}; PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16; object.listEdgeSpacer = {width: PX_16}; PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object.listItemSeparator = {width: PX_12}; const env0_11 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/ShelfBlock.tsx'); exports.default = _default_106689; function ListEdgeSpacer_106687() { // fn#106687, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:926, offset: 0x022e6b7e, size: 41 bytes, params: 1, frame: 14 const styles = useStyles(); return ; } function ListItemSeparator_106688() { // fn#106688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:997, offset: 0x022e6ba7, size: 41 bytes, params: 1, frame: 14 const styles = useStyles(); return ; } function _default_106689({block, preferVCPrice}) { // fn#106689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14275:1062, offset: 0x022e6bd0, size: 1134 bytes, params: 2, frame: 39 var Button; var intl; const styles = useStyles(); const value3 = (UseNavigationNativeModule).useNavigation(); const value4 = (CollectiblesAnalyticsContextModule).useCollectiblesAnalyticsContext(); const env0_3 = value4; const useCollectiblesCoachmarkScrollDismissContext = CollectiblesCoachmarkScrollDismissContextModule.useCollectiblesCoachmarkScrollDismissContext; const handleDismissCoachmarkOnScroll = Reflect.apply(useCollectiblesCoachmarkScrollDismissContext, CollectiblesCoachmarkScrollDismissContextModule, []).handleDismissCoachmarkOnScroll; const defaultImport = UseAnalyticsLocations; const COLLECTIBLES_SHOP_SHELF = (AnalyticsLocation).COLLECTIBLES_SHOP_SHELF; const analyticsLocations = defaultImport(COLLECTIBLES_SHOP_SHELF).analyticsLocations; const value5 = (FluxModule).useStateFromStores([CollectiblesCategoryStore], _fun106690); const value6 = (UseGetProductsFromSkus)(); const binding = env0_3; const value8 = (UseFilteredAndSortedProductsModule).useFilteredAndSortedProducts({products: binding.useMemo(_fun106691, [block.rankedSkuIds, value6])}); const value9 = binding.useCallback(_fun106692, [value5, value3, value4]); const value10 = binding.useCallback(_fun106693, [block.name, preferVCPrice]); const value11 = binding.useCallback(function(a0) { return a0.skuId; }, []); if (value8.length === 0) { return null; } const value12 = block.mobileBackgroundImage != null; items2 = [styles.container]; items2[1] = value12 && styles.containerWithBackground; const AnalyticsLocationProvider = (UseAnalyticsLocationsModule).AnalyticsLocationProvider; const object = {style: items2}; items2 = [ value12 && block.mobileBackgroundImage != null && , ]; const Heading = (TextModule).Heading; const view = ( {block.name} ); let r12 = block.showButton && value5 != null; if (r12) { Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button; var buttonProps = {'variant': null, 'size': 'sm', 'shrink': true, 'grow': false, variant: value12 ? 'primary-overlay' : 'secondary'}; intl = (require(1244) /* metro dependency 1244: indexNative */).intl; buttonProps.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.xFcotU); buttonProps.onPress = value9; r12 =