113 lines
6.2 KiB
TypeScript
113 lines
6.2 KiB
TypeScript
/* Metro module 12005; source: modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx; dependencies: [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244, 2] */
|
|
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 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 NavigatorConstantsNativeModule from '../../../../design/components/Navigator/native/NavigatorConstants.native.tsx'; /* Metro dependency 5314 */
|
|
|
|
function _fun92272(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92272, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:6, offset: 0x02081ec1, size: 557 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = ReactNativeModule;
|
|
const env0_2 = value.View;
|
|
const env0_3 = value.ScrollView;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_4 = value.jsx;
|
|
const env0_5 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.scrollContainer = {minHeight: '100%'};
|
|
object.container = {'flexGrow': 1, 'alignItems': 'center', 'justifyContent': 'center'};
|
|
const NAV_BAR_HEIGHT = (NavigatorConstantsNativeModule).NAV_BAR_HEIGHT;
|
|
object.alertContainer = {paddingTop: 80 + NAV_BAR_HEIGHT};
|
|
const object4 = {'backgroundColor': null, 'borderRadius': null, 'borderWidth': 1, 'borderColor': null,
|
|
'alignItems': 'center', 'maxWidth': 290};
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object4.backgroundColor = BACKGROUND_SURFACE_HIGH;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xl;
|
|
const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE;
|
|
object4.borderColor = INTERACTIVE_BACKGROUND_ACTIVE;
|
|
const SHADOW_HIGH = (importDefault(697) /* metro dependency 697: native */).shadows.SHADOW_HIGH;
|
|
copyDataProperties(object4, SHADOW_HIGH, undefined);
|
|
object.alert = object4;
|
|
object.alertContent = {'paddingVertical': 24, 'paddingHorizontal': 24, 'alignItems': 'center'};
|
|
object.alertTitle = {'paddingBottom': 8, 'textAlign': 'center'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.alertSubtitle = {paddingBottom: PX_16, textAlign: 'center'};
|
|
object.buttonWrapper = {flexDirection: 'row'};
|
|
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
|
|
object.primaryButtonContainer = {marginBottom: PX_12};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.trailing = {flexGrow: 0, padding: PX_16};
|
|
const env0_6 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/NewUserPermissionsOnboarding.android.tsx');
|
|
exports.default = NewUserPermissionsOnboarding;
|
|
function NewUserPermissionsOnboarding({title, subtitle, header, trailing, loading, showSkip, onAllow, onDontAllow}) { // fn#92273, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12191:1025, offset: 0x020820ee, size: 688 bytes, params: 2, frame: 39
|
|
showSkip = showSkip === undefined || showSkip;
|
|
const styles = useStyles();
|
|
const Text = (TextModule).Text;
|
|
const items2 = [
|
|
<Text
|
|
style={styles.alertTitle}
|
|
variant="heading-lg/bold"
|
|
color="text-default"
|
|
>
|
|
{title}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<Text
|
|
style={styles.alertSubtitle}
|
|
variant="text-sm/medium"
|
|
color="text-default"
|
|
>
|
|
{subtitle}
|
|
</Text>
|
|
);
|
|
const items3 = [styles.buttonWrapper];
|
|
items3[1] = showSkip && styles.primaryButtonContainer;
|
|
const Button = (ButtonNativeModule).Button;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
items2[2] = (
|
|
<View style={items3}>
|
|
<Button
|
|
variant="primary"
|
|
size="md"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['2nYlT2'])}
|
|
onPress={onAllow}
|
|
loading={loading}
|
|
grow
|
|
/>
|
|
</View>
|
|
);
|
|
items2[3] = showSkip && <View style={styles.buttonWrapper}><Button variant="secondary" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['5Wxrcd'])} onPress={onDontAllow} grow /></View>;
|
|
return (
|
|
<ScrollView contentContainerStyle={styles.scrollContainer}>
|
|
<View style={styles.container}>
|
|
<View style={styles.alertContainer}>
|
|
<View>
|
|
{header}
|
|
<View style={styles.alert}>
|
|
<View style={styles.alertContent}>
|
|
{items2}
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
<View style={styles.trailing}>
|
|
{trailing}
|
|
</View>
|
|
</ScrollView>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun92272, 12005, [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244,
|
|
2]) /* metro module 12005, dependencies: [31, 27, 33, 4501, 5314, 697, 4573, 4578, 1244, 2] */;
|