89 lines
5.1 KiB
TypeScript
89 lines
5.1 KiB
TypeScript
/* Metro module 14241; source: modules/virtual_currency/native/OrbCheckoutMenu.tsx; dependencies: [57, 31, 33, 4501, 5080, 10113, 1962, 3857, 6239, 4573, 7981, 4578, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import ToastActionCreators from '../../toast/native/ToastActionCreators.tsx'; /* Metro dependency 3857 */
|
|
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 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 CardNativeModule from '../../../design/components/Card/native/Card.native.tsx'; /* Metro dependency 6239 */
|
|
import * as TextInputNativeModule from '../../../design/components/TextInput/native/TextInput.native.tsx'; /* Metro dependency 7981 */
|
|
|
|
function _fun107719(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#107719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14438:6, offset: 0x02306bb1, size: 222 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_7 = (CreateStylesModule).createStyles({textInput: {marginBottom: 16},
|
|
title: {marginBottom: 8}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/virtual_currency/native/OrbCheckoutMenu.tsx');
|
|
exports.default = OrbCheckoutMenu;
|
|
function OrbCheckoutMenu() { // fn#107720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14438:226, offset: 0x02306c8f, size: 377 bytes, params: 1, frame: 25
|
|
const styles = useStyles();
|
|
const [property, env0_1] = Module00057(ReactModule.useState('1409898407849365565'), 2);
|
|
const value4 = ReactModule.useCallback(_fun107721, [property]);
|
|
const Card = (CardNativeModule).Card;
|
|
const Text = (TextModule).Text;
|
|
const items2 = [
|
|
<Text style={styles.title} variant="text-md/bold">
|
|
{'Redeem SKU for Orbs'}
|
|
</Text>,
|
|
];
|
|
const TextInput = (TextInputNativeModule).TextInput;
|
|
items2[1] = (
|
|
<TextInput
|
|
containerStyle={styles.textInput}
|
|
label="SKU ID"
|
|
value={property}
|
|
onChange={onChange_107723}
|
|
isClearable
|
|
/>
|
|
);
|
|
items2[2] = (
|
|
<Text style={styles.title} variant="text-md/bold">
|
|
{'Checkout will open with the orb price of the product, if it exists'}
|
|
</Text>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
items2[3] = (
|
|
<Button
|
|
text="Open Orbs Checkout"
|
|
variant="primary"
|
|
onPress={value4}
|
|
disabled={property == null}
|
|
/>
|
|
);
|
|
return (
|
|
<Card>
|
|
{items2}
|
|
</Card>
|
|
);
|
|
function _fun107721() { // fn#107721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14438:339, offset: 0x02306e08, size: 121 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var value2;
|
|
var defaultImport;
|
|
if (env0_0 != null) {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(dependencyMap[4]);
|
|
defaultImport.pushLazy(require(dependencyMap[6])(dependencyMap[5], dependencyMap.paths), {skuId: env0_0,
|
|
analyticsLocations: [], onCheckoutSuccess: onCheckoutSuccess_107722});
|
|
}
|
|
function onCheckoutSuccess_107722() { // fn#107722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14438:441, offset: 0x02306e81, size: 52 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__.__proto__;
|
|
(ToastActionCreators).open({'key': 'ORB_CHECKOUT_SUCCESS',
|
|
'content': 'Successfully redeemed item with Orbs'});
|
|
}
|
|
|
|
}
|
|
|
|
function OrbCheckoutMenuOnChange(a0) { // fn#107723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14438:746, owner: OrbCheckoutMenu.onChange, offset: 0x00db7e35, size: 19 bytes, params: 2, frame: 11
|
|
return env0_1(a0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun107719, 14241, [57, 31, 33, 4501, 5080, 10113, 1962, 3857, 6239, 4573, 7981, 4578,
|
|
2]) /* metro module 14241, dependencies: [57, 31, 33, 4501, 5080, 10113, 1962, 3857, 6239, 4573, 7981, 4578, 2] */;
|