Files
2026-07-28 01:06:53 +03:00

145 lines
8.9 KiB
TypeScript

/* Metro module 11075; source: modules/stickers/native/StickerPickerEmptyState.tsx; dependencies: [57, 31, 27, 6583, 3832, 661, 1880, 33, 4501, 11049, 10970, 6771, 6789, 566, 683, 4573, 1244, 5278, 4081, 4082, 4578, 5475, 7938, 11069, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import HapticFeedbackTypes from '../../haptics/HapticFeedbackTypes.tsx'; /* Metro dependency 4082 */
import StickersStore from '../StickersStore.tsx'; /* Metro dependency 6583 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
import * as PremiumConstantsModule from '../../premium/PremiumConstants.tsx'; /* Metro dependency 1880 */
import * as StickersConstantsModule from '../StickersConstants.tsx'; /* Metro dependency 3832 */
import * as HapticUtilsNativeModule from '../../haptics/HapticUtils.native.tsx'; /* Metro dependency 4081 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
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 PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as StickersHooksModule from '../StickersHooks.tsx'; /* Metro dependency 11049 */
function _fun84775(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#84775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:6, offset: 0x01f56f0f, size: 419 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ConstantsModule;
const env0_8 = value.AnalyticEvents;
const env0_9 = value.AnalyticsSections;
value = require(33) /* metro dependency 33 */;
const env0_11 = value.jsx;
const env0_12 = value.jsxs;
const env0_13 = (CreateStylesModule).createStyles({header: {'marginBottom': 8,
'textAlign': 'center'}, blurb: {'lineHeight': 18, 'textAlign': 'center', 'marginBottom': 12},
premiumButton: {'marginTop': 20, 'alignSelf': 'center', 'paddingLeft': 5, 'paddingRight': 10, 'flexGrow': 0},
nitroWheel: {width: 32}, stickersRow: {'flexDirection': 'row', 'alignSelf': 'center'},
sticker: {paddingHorizontal: 2}});
(FileImportTrackerModule).fileFinishedImporting('modules/stickers/native/StickerPickerEmptyState.tsx');
exports.default = _default_84777;
function EmptyStateSticker({sticker, isFocused}) { // fn#84776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:617, offset: 0x01f570b2, size: 115 bytes, params: 2, frame: 17
return ((Component) => <Component sticker={sticker} size={60} animated={(require(11049) /* metro dependency 11049: StickersHooks */).useShouldAnimateSticker(isFocused)} key={sticker?.id} />)(importDefault(10970) /* metro dependency 10970: Sticker */);
}
function _default_84777() { // fn#84777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:766, offset: 0x01f57125, size: 679 bytes, params: 1, frame: 27
const styles = useStyles();
(StickersHooksModule).useFetchStickerPacks();
let defaultImport = UseAnalyticsLocations;
const EMPTY_STATE = (AnalyticsLocation).EMPTY_STATE;
const analyticsLocations = defaultImport(EMPTY_STATE).analyticsLocations;
const value2 = (FluxModule).useStateFromStoresArray([StickersStore], _fun84778);
const [env0_2, env0_3] = env0_3Binding(ReactModule.useState(null), 2);
ReactModule.useEffect(function() {
var defaultImport = importDefault(dependencyMap[14]);
var PREMIUM_UPSELL_VIEWED = AnalyticEvents.PREMIUM_UPSELL_VIEWED;
defaultImport.track(PREMIUM_UPSELL_VIEWED, {type: PremiumUpsellTypes.EMPTY_STICKER_PICKER_UPSELL,
source: {section: AnalyticsSections.EMPTY_STICKER_PICKER_UPSELL}, location_stack: analyticsLocations});
}, [analyticsLocations]);
const Text = (TextModule).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const HEm04J = (require(1244) /* metro dependency 1244: indexNative */).t.HEm04J;
const items2 = [
<Text
style={styles.header}
accessibilityRole="header"
variant="heading-lg/extrabold"
color="mobile-text-heading-primary"
>
{Reflect.apply(string, intl, [HEm04J])}
</Text>,
];
string = intl.string;
const FnNud4 = (require(1244) /* metro dependency 1244: indexNative */).t.FnNud4;
items2[1] = (
<Text
style={styles.blurb}
variant="text-sm/medium"
color="text-default"
>
{Reflect.apply(string, intl, [FnNud4])}
</Text>
);
items2[2] = (
<View style={styles.stickersRow}>
{value2.map(_fun84782)}
</View>
);
const Button = (ButtonNativeModule).Button;
items2[3] = (
<View style={styles.premiumButton}>
<Button
icon={((Component) => <Component source={importDefault(7938) /* metro dependency 7938 */} style={styles.nitroWheel} resizeMode="contain" />)(importDefault(5475) /* metro dependency 5475: FastImage */)}
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pj0XBN)}
variant="active"
size="sm"
onPress={function() {
return importDefault(dependencyMap[23])({section: AnalyticsSections.EXPRESSION_PICKER});
}}
/>
</View>
);
return (
<View>
{items2}
</View>
);
function _fun84778() { // fn#84778, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:908, offset: 0x01f573cc, size: 45 bytes, params: 1, frame: 12
var environment;
const value = environment.__proto__;
return EMPTY_STATE_STICKERS.map(function(a0) {
return StickersStore.getStickerById(a0);
}).filter(function(a0) {
return a0 != null;
});
}
function _fun84782(a0) { // fn#84782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:1543, offset: 0x01f57471, size: 145 bytes, params: 2, frame: 19
const env0_0 = a0;
const value2 = undefined;
const PressableOpacity = (PressablesModule).PressableOpacity;
return (
<PressableOpacity
accessible={false}
onLongPress={onLongPress_84783}
style={styles.sticker}
key={a0 == null ? value2 : a0.id}
>
<EmptyStateSticker sticker={a0} isFocused={env0_2 === a0.id} />
</PressableOpacity>
);
function onLongPress_84783() { // fn#84783, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11261:1601, offset: 0x01f57502, size: 84 bytes, params: 1, frame: 14
const triggerHapticFeedback = HapticUtilsNativeModule.triggerHapticFeedback;
const IMPACT_LIGHT = (HapticFeedbackTypes).IMPACT_LIGHT;
Reflect.apply(triggerHapticFeedback, HapticUtilsNativeModule, [IMPACT_LIGHT]);
env1_3(env0_0.id);
}
}
}
}
global.__d(_fun84775, 11075, [57, 31, 27, 6583, 3832, 661, 1880, 33, 4501, 11049, 10970, 6771, 6789, 566, 683, 4573,
1244, 5278, 4081, 4082, 4578, 5475, 7938, 11069,
2]) /* metro module 11075, dependencies: [57, 31, 27, 6583, 3832, 661, 1880, 33, 4501, 11049, 10970, 6771, 6789, 566, 683, 4573, 1244, 5278, 4081, 4082, 4578, 5475, 7938, 11069, 2] */;