173 lines
8.8 KiB
TypeScript
173 lines
8.8 KiB
TypeScript
/* Metro module 12046; source: modules/nuf/native/components/DiscoverabilityActionSheet.tsx; dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
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 ConstantsModule from '../../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ActionSheetNativeModule from '../../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
|
|
import * as NativeModule from '../../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
|
|
import * as ContactSyncModalStoreModule from '../../../contact_sync/native/ContactSyncModalStore.tsx'; /* Metro dependency 11994 */
|
|
import * as ContactSyncUtilsModule from '../../../contact_sync/native/ContactSyncUtils.tsx'; /* Metro dependency 11997 */
|
|
|
|
function _fun92566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:6, offset: 0x0208fa60, size: 449 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ContactSyncModalStoreModule;
|
|
const env0_4 = value.useContactSyncModalStore;
|
|
const env0_5 = value.setAllowSync;
|
|
const env0_6 = value.setAllowPhone;
|
|
const env0_7 = value.setAllowEmail;
|
|
const Fonts = (ConstantsModule).Fonts;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
|
|
object.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
|
|
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
|
|
object.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
|
|
object.syncRow = {marginTop: 24};
|
|
const object4 = {};
|
|
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
|
object4.fontFamily = PRIMARY_SEMIBOLD;
|
|
const INTERACTIVE_TEXT_ACTIVE = (Native).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object4.color = INTERACTIVE_TEXT_ACTIVE;
|
|
object.formText = object4;
|
|
const TEXT_SUBTLE = (Native).colors.TEXT_SUBTLE;
|
|
object.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
|
|
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/nuf/native/components/DiscoverabilityActionSheet.tsx');
|
|
exports.default = DiscoverabilityActionSheet;
|
|
function DiscoverabilityActionSheet() { // fn#92567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:771, offset: 0x0208fc21, size: 1289 bytes, params: 1, frame: 33
|
|
const styles = useStyles();
|
|
const {allowPhone, allowEmail} = useContactSyncModalStore();
|
|
const r14 = allowPhone || allowEmail;
|
|
const binding = r14;
|
|
const value3 = binding.useCallback(_fun92568, [r14]);
|
|
const value4 = binding.useCallback(function() {
|
|
setAllowPhone(!allowPhone);
|
|
}, [allowPhone]);
|
|
const value5 = binding.useCallback(function() {
|
|
setAllowEmail(!allowEmail);
|
|
}, [allowEmail]);
|
|
const FormRow = (NativeModule).FormRow;
|
|
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
|
|
const FormRow2 = (NativeModule).FormRow;
|
|
let Label = FormRow2.Label;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
formRowProps3.label = (
|
|
<Label
|
|
style={styles.formText}
|
|
text={Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.gMUgpv])}
|
|
/>
|
|
);
|
|
formRowProps3.onPress = value3;
|
|
const FormRow3 = (NativeModule).FormRow;
|
|
let Checkbox = FormRow3.Checkbox;
|
|
formRowProps3.trailing = <Checkbox selected={r14} />;
|
|
const items2 = [
|
|
<FormRow {...formRowProps3} />,
|
|
];
|
|
const FormText = (NativeModule).FormText;
|
|
items2[1] = (
|
|
<FormText style={styles.info}>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.pfjsB5)}
|
|
</FormText>
|
|
);
|
|
items2[2] = (
|
|
<FormText style={styles.info}>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.cW1nr9)}
|
|
</FormText>
|
|
);
|
|
items2[3] = (
|
|
<FormText style={styles.info}>
|
|
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.eswIfi,
|
|
{learnMoreHook: learnMoreHook_92571})}
|
|
</FormText>
|
|
);
|
|
const FormTitle = (NativeModule).FormTitle;
|
|
items2[4] = (
|
|
<FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />
|
|
);
|
|
const formRowProps = {DEPRECATED_style: styles.formRow};
|
|
const FormRow4 = (NativeModule).FormRow;
|
|
Label = FormRow4.Label;
|
|
formRowProps.label = (
|
|
<Label
|
|
style={styles.formText}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])}
|
|
/>
|
|
);
|
|
const Text = (TextModule).Text;
|
|
string = intl.string;
|
|
const X7pIKN = (require(1244) /* metro dependency 1244: indexNative */).t.X7pIKN;
|
|
formRowProps.subLabel = (
|
|
<Text variant="text-sm/medium" color="text-default">
|
|
{Reflect.apply(string, intl, [X7pIKN])}
|
|
</Text>
|
|
);
|
|
formRowProps.onPress = value4;
|
|
const FormRow5 = (NativeModule).FormRow;
|
|
Checkbox = FormRow5.Checkbox;
|
|
formRowProps.trailing = <Checkbox selected={allowPhone} />;
|
|
items2[5] = <FormRow {...formRowProps} />;
|
|
const formRowProps2 = {DEPRECATED_style: styles.formRow};
|
|
const FormRow6 = (NativeModule).FormRow;
|
|
Label = FormRow6.Label;
|
|
formRowProps2.label = (
|
|
<Label
|
|
style={styles.formText}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S)}
|
|
/>
|
|
);
|
|
formRowProps2.subLabel = (
|
|
<Text variant="text-sm/medium" color="text-default">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.ilGsHE)}
|
|
</Text>
|
|
);
|
|
formRowProps2.onPress = value5;
|
|
const FormRow7 = (NativeModule).FormRow;
|
|
Checkbox = FormRow7.Checkbox;
|
|
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
|
|
items2[6] = <FormRow {...formRowProps2} />;
|
|
const view = (
|
|
<View style={styles.container}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
|
|
return (
|
|
<ActionSheet startExpanded>
|
|
{view}
|
|
</ActionSheet>
|
|
);
|
|
function _fun92568() { // fn#92568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:879, offset: 0x02081e18, size: 26 bytes, params: 1, frame: 11
|
|
setAllowSync(!ReactModule);
|
|
}
|
|
|
|
function DiscoverabilityActionSheetLearnMoreHook(a0, a1) { // fn#92571, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12232:1473, owner: DiscoverabilityActionSheet.learnMoreHook, offset: 0x0209015e, size: 91 bytes, params: 3, frame: 17
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
onPress={(ContactSyncUtilsModule).handleOpenLearnMoreLink}
|
|
variant="text-sm/medium"
|
|
color="text-link"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun92566, 12046, [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805,
|
|
2]) /* metro module 12046, dependencies: [31, 27, 11994, 661, 33, 4501, 697, 7972, 1244, 4573, 11997, 6805, 2] */;
|