147 lines
8.2 KiB
TypeScript
147 lines
8.2 KiB
TypeScript
/* Metro module 7017; source: modules/checkout/native/GiftCardMobileConsumptionActionSheet.tsx; dependencies: [31, 27, 1376, 33, 4501, 697, 1585, 4080, 6275, 4572, 5473, 4573, 1244, 2030, 4578, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import GiftCardMessages from '../messages/GiftCard.messages.js'; /* Metro dependency 2030 */
|
|
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 DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
|
|
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 NativeModule from '../../../design/assets/native.tsx'; /* Metro dependency 5473 */
|
|
import * as BottomSheetNativeModule from '../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
|
|
function _fun55598(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:6, offset: 0x013ab49f, size: 345 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
|
|
object.sheet = {backgroundColor: BACKGROUND_BASE_LOW};
|
|
const PX_16 = (Native).space.PX_16;
|
|
object.container = {paddingHorizontal: PX_16};
|
|
const PX_12 = (Native).space.PX_12;
|
|
object.illustration = {'alignSelf': 'stretch', 'alignItems': 'center', paddingTop: PX_12};
|
|
object.body = {'textAlign': 'center', 'fontFamily': 'gg sans', 'fontSize': 16, 'fontWeight': 600, 'lineHeight': 20,
|
|
'alignSelf': 'center', 'width': 280};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/checkout/native/GiftCardMobileConsumptionActionSheet.tsx');
|
|
exports.default = GiftCardMobileConsumptionActionSheet;
|
|
function GiftCardMobileConsumptionActionSheet({markAsDismissed}) { // fn#55599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:630, offset: 0x013ab5f8, size: 600 bytes, params: 2, frame: 30
|
|
const styles = useStyles();
|
|
const bottom = (UseSafeAreaInsetsNative)().bottom;
|
|
const binding = env0_3;
|
|
const env0_1 = binding.useRef(false);
|
|
const env0_2 = binding.useRef(markAsDismissed);
|
|
binding.useEffect(_fun55600, [markAsDismissed]);
|
|
binding.useEffect(function() {
|
|
return _fun55602;
|
|
}, []);
|
|
var env0_3 = binding.useCallback(_fun55603, [markAsDismissed]);
|
|
const BottomSheet = (BottomSheetNativeModule).BottomSheet;
|
|
const bottomSheetProps = {startExpanded: true, backgroundStyles: styles.sheet, onDismiss: onDismiss_55604};
|
|
const items3 = [styles.container];
|
|
items3[1] = {paddingBottom: bottom};
|
|
const Stack = (StackNativeModule).Stack;
|
|
const PX_16 = (Native).space.PX_16;
|
|
const LaptopSpotIllustration = (NativeModule).LaptopSpotIllustration;
|
|
const items2 = [
|
|
<View style={styles.illustration}>
|
|
<LaptopSpotIllustration
|
|
scale={1}
|
|
width={150}
|
|
height={123}
|
|
/>
|
|
</View>,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const V3DI1E = (GiftCardMessages).V3DI1E;
|
|
items2[1] = (
|
|
<Text
|
|
variant="text-md/medium"
|
|
color="text-default"
|
|
style={styles.body}
|
|
>
|
|
{Reflect.apply(string, intl, [V3DI1E])}
|
|
</Text>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const YZePWx = (GiftCardMessages).YZePWx;
|
|
items2[2] = (
|
|
<Button
|
|
size="lg"
|
|
variant="secondary"
|
|
grow
|
|
text={Reflect.apply(string, intl, [YZePWx])}
|
|
onPress={onPress_55605}
|
|
/>
|
|
);
|
|
return (
|
|
<BottomSheet {...bottomSheetProps}>
|
|
<View style={items3}>
|
|
<Stack spacing={PX_16}>
|
|
{items2}
|
|
</Stack>
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
function _fun55600() { // fn#55600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:768, offset: 0x010cb3d0, size: 21 bytes, params: 1, frame: 2
|
|
env0_2.current = markAsDismissed;
|
|
}
|
|
|
|
function _fun55601() { // fn#55601, offset: 0x013ab850, size: 9 bytes, params: 1, frame: 1
|
|
return _fun55602;
|
|
function _fun55602() { // fn#55602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:809, offset: 0x013ab859, size: 46 bytes, params: 1, frame: 11
|
|
var binding;
|
|
let current = env1_1.current;
|
|
if (!current) {
|
|
binding = env1_2;
|
|
current = binding.current;
|
|
value = environment.__proto__.__proto__;
|
|
Reflect.apply(current, binding, [ContentDismissActionType.AUTO_DISMISS]);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
function _fun55603(a0) { // fn#55603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:878, offset: 0x013ab887, size: 78 bytes, params: 2, frame: 12
|
|
var value;
|
|
if (!env0_1.current) {
|
|
env0_1.current = true;
|
|
markAsDismissed(a0);
|
|
value = environment.__proto__;
|
|
value = importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */;
|
|
value.hideActionSheet();
|
|
}
|
|
}
|
|
|
|
function GiftCardMobileConsumptionActionSheetOnDismiss() { // fn#55604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:1028, owner: GiftCardMobileConsumptionActionSheet.onDismiss, offset: 0x013ab8d5, size: 29 bytes, params: 1, frame: 11
|
|
const binding = env0_3;
|
|
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
|
return binding(USER_DISMISS);
|
|
}
|
|
|
|
function GiftCardMobileConsumptionActionSheetOnPress() { // fn#55605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7195:1502, owner: GiftCardMobileConsumptionActionSheet.onPress, offset: 0x013ab8d5, size: 29 bytes, params: 1, frame: 11
|
|
const binding = env0_3;
|
|
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
|
return binding(USER_DISMISS);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun55598, 7017, [31, 27, 1376, 33, 4501, 697, 1585, 4080, 6275, 4572, 5473, 4573, 1244, 2030, 4578,
|
|
2]) /* metro module 7017, dependencies: [31, 27, 1376, 33, 4501, 697, 1585, 4080, 6275, 4572, 5473, 4573, 1244, 2030, 4578, 2] */;
|