116 lines
8.0 KiB
TypeScript
116 lines
8.0 KiB
TypeScript
/* Metro module 10206; source: modules/oauth2/native/OAuth2AuthorizeModal.tsx; dependencies: [31, 27, 33, 4501, 697, 9342, 1585, 4017, 4577, 5278, 1244, 10207, 5312, 4573, 6618, 10209, 2] */
|
|
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
|
|
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import UseOAuth2AuthorizeForm from './useOAuth2AuthorizeForm.tsx'; /* Metro dependency 9342 */
|
|
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 ReanimatedRexportModule from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as SpringModule from '../../../design/animation/reanimated/spring/spring.tsx'; /* Metro dependency 4577 */
|
|
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
|
|
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
|
|
|
|
function _fun79346(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79346, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:6, offset: 0x01e4f06f, size: 388 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
const env0_7 = {'overshootClamping': true, 'stiffness': 20, 'damping': 15, 'mass': 0.03};
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
let BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER};
|
|
object.contentContainer = {flex: 1};
|
|
object.titleContainer = {'padding': 16, 'flexDirection': 'row', 'gap': 16};
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object.titleContainerBorder = {'position': 'absolute', 'left': 0, 'right': 0, 'bottom': 0, 'height': 1,
|
|
backgroundColor: BORDER_SUBTLE};
|
|
BACKGROUND_BASE_LOWER = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWER;
|
|
object.title = {'flex': 1, 'justifyContent': 'center', 'alignItems': 'center', 'backgroundColor': null,
|
|
'marginEnd': 40, backgroundColor: BACKGROUND_BASE_LOWER};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: 'function OAuth2AuthorizeModalTsx1(){const{borderOpacity}=this.__closure;var _borderOpacity$get;return{opacity:(_borderOpacity$get=borderOpacity.get())!==null&&_borderOpacity$get!==void 0?_borderOpacity$get:1};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/OAuth2AuthorizeModal.tsx');
|
|
exports.default = OAuth2AuthorizeModal;
|
|
function OAuth2AuthorizeModal(a0) { // fn#79347, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:944, offset: 0x01e4f1f3, size: 902 bytes, params: 2, frame: 31
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const styles = useStyles();
|
|
const value2 = (UseOAuth2AuthorizeForm)(a0);
|
|
const top = (UseSafeAreaInsetsNative)().top;
|
|
const value3 = (ReanimatedRexportModule).useSharedValue(0);
|
|
const useAnimatedStyle = ReanimatedRexportModule.useAnimatedStyle;
|
|
const OAuth2AuthorizeModalB2 = OAuth2AuthorizeModalB;
|
|
OAuth2AuthorizeModalB2.__closure = {borderOpacity: value3};
|
|
OAuth2AuthorizeModalB2.__workletHash = 5916964482569;
|
|
OAuth2AuthorizeModalB2.__initData = env0_9;
|
|
const value4 = Reflect.apply(useAnimatedStyle, ReanimatedRexportModule, [OAuth2AuthorizeModalB2]);
|
|
const value5 = ReactModule.useCallback(_fun79349, [value3]);
|
|
const items3 = [styles.titleContainer];
|
|
items3[1] = {paddingTop: top + 16};
|
|
const PressableOpacity = (PressablesModule).PressableOpacity;
|
|
const items2 = [
|
|
<PressableOpacity
|
|
accessibilityRole="button"
|
|
accessibilityLabel={value2.backStep != null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq)}
|
|
onPress={onPress_79350}
|
|
>
|
|
{
|
|
value2.backStep != null
|
|
? ((ArrowSmallLeftIcon) => <ArrowSmallLeftIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(10207) /* metro dependency 10207: ArrowSmallLeftIcon */).ArrowSmallLeftIcon)
|
|
: ((XSmallIcon) => <XSmallIcon color={(importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT} />)((require(5312) /* metro dependency 5312: XSmallIcon */).XSmallIcon)
|
|
}
|
|
</PressableOpacity>,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
items2[1] = (
|
|
<View style={styles.title}>
|
|
<Text variant="redesign/heading-18/bold" accessibilityRole="header">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['y+/PE9'])}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const View2 = (ReanimatedRexport).View;
|
|
items2[2] = <View2 style={[styles.titleContainerBorder, value4]} />;
|
|
const items4 = [
|
|
<View style={items3}>
|
|
{items2}
|
|
</View>,
|
|
];
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
items4[1] = (
|
|
<SafeAreaPaddingView bottom style={styles.contentContainer}>
|
|
{((Component) => <Component {...value2} {...{['onScroll']: value5}} {...{['centerContent']: true}} />)(importDefault(10209) /* metro dependency 10209: OAuth2AuthorizeContent */)}
|
|
</SafeAreaPaddingView>
|
|
);
|
|
return (
|
|
<View style={styles.container}>
|
|
{items4}
|
|
</View>
|
|
);
|
|
function OAuth2AuthorizeModalB() { // fn#79348, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1077, owner: OAuth2AuthorizeModal.b, offset: 0x01e4f579, size: 39 bytes, params: 1, frame: 11
|
|
return {opacity: env0_1.get() ?? 1};
|
|
}
|
|
|
|
function _fun79349({nativeEvent}) { // fn#79349, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1228, offset: 0x01e4f5a0, size: 94 bytes, params: 2, frame: 17
|
|
const binding = env0_1;
|
|
const set = binding.set;
|
|
Reflect.apply(set, binding, [SpringModule.withSpring(nativeEvent.contentOffset.y > 16 ? 1 : 0, env1_7)]);
|
|
}
|
|
|
|
function OAuth2AuthorizeModalOnPress() { // fn#79350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10392:1585, owner: OAuth2AuthorizeModal.onPress, offset: 0x01e4f5fe, size: 40 bytes, params: 1, frame: 10
|
|
return env0_0.goBackOrCancel?.();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79346, 10206, [31, 27, 33, 4501, 697, 9342, 1585, 4017, 4577, 5278, 1244, 10207, 5312, 4573, 6618,
|
|
10209,
|
|
2]) /* metro module 10206, dependencies: [31, 27, 33, 4501, 697, 9342, 1585, 4017, 4577, 5278, 1244, 10207, 5312, 4573, 6618, 10209, 2] */;
|