87 lines
6.3 KiB
TypeScript
87 lines
6.3 KiB
TypeScript
/* Metro module 8542; source: modules/reactions/native/useBurstToggleCoachmark.tsx; dependencies: [57, 31, 27, 1878, 1376, 33, 1365, 4501, 697, 7952, 566, 3802, 7013, 1244, 8543, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as Dismissible_contentModule from '../../../external/discord_common/js/packages/protos/discord_protos/discord_users/v1/dismissible_content.tsx'; /* Metro dependency 1365 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as PremiumUtilsModule from '../../../utils/PremiumUtils.tsx'; /* Metro dependency 3802 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as SuperReactionIconModule from '../../../design/components/Icon/native/redesign/generated/SuperReactionIcon.tsx'; /* Metro dependency 7952 */
|
|
import * as UseCoachmarkNativeModule from '../../../design/components/Coachmark/native/useCoachmark.native.tsx'; /* Metro dependency 8543 */
|
|
|
|
function _fun67718(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#67718, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8727:6, offset: 0x01c2e460, size: 357 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const DismissibleContent = (Dismissible_contentModule).DismissibleContent;
|
|
const env0_9 = DismissibleContent.SUPER_REACTION_TOGGLE_EDUCATION_MOBILE;
|
|
const createStyles = CreateStylesModule.createStyles;
|
|
const object2 = {'backgroundColor': null, 'borderRadius': null, 'height': 40, 'width': 40, 'display': 'flex',
|
|
'alignItems': 'center', 'justifyContent': 'center'};
|
|
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
|
object2.backgroundColor = BACKGROUND_BRAND;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const env0_10 = Reflect.apply(createStyles, CreateStylesModule, [{upsellImageContainer: object2}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/reactions/native/useBurstToggleCoachmark.tsx');
|
|
exports.default = useBurstToggleCoachmark;
|
|
function EducationCoachmarkImg() { // fn#67719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8727:466, offset: 0x01c2e5c5, size: 122 bytes, params: 1, frame: 19
|
|
const styles = useStyles();
|
|
const SuperReactionIcon = (SuperReactionIconModule).SuperReactionIcon;
|
|
const WHITE = (Native).colors.WHITE;
|
|
return (
|
|
<View style={styles.upsellImageContainer}>
|
|
<SuperReactionIcon color={WHITE} size="md" />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function useBurstToggleCoachmark(a0) { // fn#67720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8727:726, offset: 0x01c2e63f, size: 232 bytes, params: 2, frame: 18
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const value3 = Module00057((require(7013) /* metro dependency 7013: useSelectedDismissibleContent */).useSelectedDismissibleContent(PremiumUtilsModule.isPremium(currentUser) ? [SUPER_REACTION_TOGGLE_EDUCATION_MOBILE] : []),
|
|
2);
|
|
const property = value3[0];
|
|
const property2 = value3[1];
|
|
const useMemo = ReactModule.useMemo;
|
|
(UseCoachmarkNativeModule).useCoachmark(a0, Reflect.apply(useMemo, ReactModule,
|
|
[_fun67722, [property, property2]]));
|
|
return property2;
|
|
function _fun67722() { // fn#67722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8727:937, offset: 0x01c2e727, size: 174 bytes, params: 1, frame: 18
|
|
const object = {};
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
object.description = Reflect.apply(string, intl, [t.nyYohm]);
|
|
object.onDismiss = onDismiss_67723;
|
|
object.position = 'bottom';
|
|
object.renderImgComponent = renderImgComponent;
|
|
string = intl.string;
|
|
const ORK94p = t.ORK94p;
|
|
object.title = Reflect.apply(string, intl, [ORK94p]);
|
|
object.visible = env0_0 === SUPER_REACTION_TOGGLE_EDUCATION_MOBILE;
|
|
return object;
|
|
function onDismiss_67723() { // fn#67723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8727:1005, offset: 0x01c2e7d5, size: 29 bytes, params: 1, frame: 11
|
|
const binding = env1_1;
|
|
const UNKNOWN = ContentDismissActionType.UNKNOWN;
|
|
binding(UNKNOWN);
|
|
}
|
|
|
|
function renderImgComponent() { // fn#67724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8727:1061, offset: 0x01c2e7f2, size: 23 bytes, params: 1, frame: 13
|
|
return <EducationCoachmarkImg />;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun67718, 8542, [57, 31, 27, 1878, 1376, 33, 1365, 4501, 697, 7952, 566, 3802, 7013, 1244, 8543,
|
|
2]) /* metro module 8542, dependencies: [57, 31, 27, 1878, 1376, 33, 1365, 4501, 697, 7952, 566, 3802, 7013, 1244, 8543, 2] */;
|