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

64 lines
4.6 KiB
TypeScript

/* Metro module 10152; source: modules/collectibles/native/UnlockWithNitroButton.tsx; dependencies: [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954, 2] */
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
import CollectiblesPurchaseStore from '../CollectiblesPurchaseStore.tsx'; /* Metro dependency 5145 */
import UseOpenNitroSubscribeActionSheet from './useOpenNitroSubscribeActionSheet.tsx'; /* Metro dependency 10105 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as CollectiblesShopConstantsModule from '../CollectiblesShopConstants.tsx'; /* Metro dependency 663 */
import * as BaseTextButtonNativeModule from '../../../design/components/Button/native/BaseTextButton.native.tsx'; /* Metro dependency 4579 */
import * as NitroWheelIconModule from '../../../design/components/Icon/native/redesign/generated/NitroWheelIcon.tsx'; /* Metro dependency 7954 */
function _fun79117(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79117, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:6, offset: 0x01e4597b, size: 192 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/UnlockWithNitroButton.tsx');
exports.UnlockWithNitroButton = UnlockWithNitroButton;
function UnlockWithNitroButton({shouldShrink, onTrackPress, text}) { // fn#79118, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:272, offset: 0x01e45a3b, size: 404 bytes, params: 2, frame: 23
var r7;
var intl;
shouldShrink = !(shouldShrink === undefined) && shouldShrink;
const value4 = (FluxModule).useStateFromStores([CollectiblesPurchaseStore,
IAPStoreAndroid], _fun79119);
const env0_1 = (UseOpenNitroSubscribeActionSheet)();
if (text != null) {
r7 = text;
} else {
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
r7 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.sEAnVH);
}
const BaseTextButton = (BaseTextButtonNativeModule).BaseTextButton;
object = {textElement: shouldShrink ? ((Text) => <Text variant="text-xs/semibold" color="always-white" allowFontScaling={false}>{r7}</Text>)((require(4573) /* metro dependency 4573: Text */).Text) : undefined,
text: shouldShrink ? undefined : r7, accessibilityLabel: r7, variant: 'primary',
size: shouldShrink ? 'sm' : 'md', grow: true};
const NitroWheelIcon = (NitroWheelIconModule).NitroWheelIcon;
object.icon = <NitroWheelIcon size="sm" color="white" />;
object.onPress = onPress_79120;
object.disabled = value4;
return <BaseTextButton {...object} />;
function _fun79119() { // fn#79119, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:358, offset: 0x01e45bcf, size: 73 bytes, params: 1, frame: 14
const value = environment.__proto__;
return CollectiblesPurchaseStore.isClaiming != null || IAPStoreAndroid.isPurchasingProduct((require(5143) /* metro dependency 5143: ProductIdsAndroid */).ProductIds.GENERIC_CONSUMABLE);
}
function UnlockWithNitroButtonOnPress() { // fn#79120, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10338:805, owner: UnlockWithNitroButton.onPress, offset: 0x01e45c18, size: 49 bytes, params: 1, frame: 12
var value2;
let onTrackPressBinding = onTrackPress;
if (onTrackPressBinding != null) {
onTrackPressBinding = onTrackPress;
value2 = environment.__proto__;
onTrackPressBinding(ShopCtaEnum.UNLOCK_WITH_NITRO);
}
env0_1();
}
}
}
global.__d(_fun79117, 10152, [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954,
2]) /* metro module 10152, dependencies: [31, 5140, 5145, 663, 33, 566, 5143, 10105, 1244, 4579, 4573, 7954, 2] */;