132 lines
7.2 KiB
TypeScript
132 lines
7.2 KiB
TypeScript
/* Metro module 15278; source: modules/app_icons/native/AppIconsCoachmark.tsx; dependencies: [31, 27, 1878, 1376, 33, 4501, 697, 566, 3802, 4080, 6275, 15279, 1305, 8619, 4573, 1244, 4578, 12187, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import PremiumUtils from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import Module08619 from '../../../by-id/module-08619.js'; /* Metro dependency 8619 */
|
|
import Module15279 from '../../../by-id/module-15279.js'; /* Metro dependency 15279 */
|
|
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 NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
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 BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as AppIconUtilsModule from './AppIconUtils.tsx'; /* Metro dependency 12187 */
|
|
|
|
function _fun116873(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116873, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15475:6, offset: 0x02499143, size: 405 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_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const PX_16 = (Native).space.PX_16;
|
|
object.container = {padding: PX_16, paddingBottom: 0};
|
|
object.info = {alignItems: 'center'};
|
|
object.image = {'alignSelf': 'center', 'marginBottom': 20};
|
|
object.nitroWheel = {marginRight: 8};
|
|
object.titleContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center'};
|
|
object.subtitle = {'marginTop': 8, 'textAlign': 'center'};
|
|
const PX_8 = (Native).space.PX_8;
|
|
object.footer = {marginTop: 20, gap: PX_8};
|
|
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/app_icons/native/AppIconsCoachmark.tsx');
|
|
exports.default = AppIconsCoachmarkActionSheet;
|
|
function AppIconsCoachmarkActionSheet({markAsDismissed}) { // fn#116874, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15475:636, offset: 0x024992d8, size: 840 bytes, params: 2, frame: 33
|
|
const styles = useStyles();
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const isPremium2 = (PremiumUtils).isPremium(currentUser);
|
|
const value2 = ReactModule.useCallback(function() {
|
|
importDefault(dependencyMap[9]).hideActionSheet();
|
|
if (markAsDismissed != null) {
|
|
markAsDismissed(ContentDismissActionType.DISMISS);
|
|
}
|
|
}, [markAsDismissed]);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const items2 = [
|
|
<Image source={Module15279} style={styles.image} />,
|
|
];
|
|
const Icon = (NativeModule).Icon;
|
|
const object2 = {source: Module08619};
|
|
const IconSizes = (NativeModule).IconSizes;
|
|
const MEDIUM = IconSizes.MEDIUM;
|
|
object2.size = MEDIUM;
|
|
object2.style = styles.nitroWheel;
|
|
object2.disableColor = true;
|
|
const icon = <Icon {...object2} />;
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const EfA4Cq = t.EfA4Cq;
|
|
items2[1] = (
|
|
<View style={styles.titleContainer}>
|
|
{icon}
|
|
<Text variant="heading-xl/extrabold" color="mobile-text-heading-primary">
|
|
{Reflect.apply(string, intl, [EfA4Cq])}
|
|
</Text>
|
|
</View>
|
|
);
|
|
string = intl.string;
|
|
items2[2] = (
|
|
<Text
|
|
variant="text-md/normal"
|
|
color="text-default"
|
|
style={styles.subtitle}
|
|
>
|
|
{isPremium2 ? Reflect.apply(string, intl, [t.IgchKK]) : Reflect.apply(string, intl, [t.D0XzaS])}
|
|
</Text>
|
|
);
|
|
const view = (
|
|
<View style={styles.info}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const Pt547C = (require(1244) /* metro dependency 1244: indexNative */).t.Pt547C;
|
|
return (
|
|
<BottomSheet
|
|
onDismiss={function() {
|
|
return markAsDismissed(ContentDismissActionType.DISMISS);
|
|
}}
|
|
contentStyles={styles.container}
|
|
>
|
|
{view}
|
|
<View style={styles.footer}>
|
|
<Button text={Reflect.apply(string, intl, [Pt547C])} onPress={onPress_116878} />
|
|
<Button
|
|
variant="secondary"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.iSrIIZ)}
|
|
onPress={value2}
|
|
/>
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
function AppIconsCoachmarkActionSheetOnPress() { // fn#116878, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15475:1578, owner: AppIconsCoachmarkActionSheet.onPress, offset: 0x02499682, size: 99 bytes, params: 1, frame: 13
|
|
const value = environment.__proto__;
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
if (markAsDismissed != null) {
|
|
markAsDismissed(ContentDismissActionType.PRIMARY);
|
|
}
|
|
(AppIconUtilsModule).navigateToAppIconSettings();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116873, 15278, [31, 27, 1878, 1376, 33, 4501, 697, 566, 3802, 4080, 6275, 15279, 1305, 8619, 4573,
|
|
1244, 4578, 12187,
|
|
2]) /* metro module 15278, dependencies: [31, 27, 1878, 1376, 33, 4501, 697, 566, 3802, 4080, 6275, 15279, 1305, 8619, 4573, 1244, 4578, 12187, 2] */;
|