118 lines
7.2 KiB
TypeScript
118 lines
7.2 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(11994) /* metro dependency 11994: ContactSyncModalStore */;
|
|
const env0_4 = value.useContactSyncModalStore;
|
|
const env0_5 = value.setAllowSync;
|
|
const env0_6 = value.setAllowPhone;
|
|
const env0_7 = value.setAllowEmail;
|
|
const Fonts = (require(661) /* metro dependency 661: Constants */).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;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.container = {backgroundColor: BACKGROUND_BASE_LOW, paddingBottom: 16};
|
|
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
|
|
object2.formRow = {'marginTop': 8, 'paddingVertical': 16, backgroundColor: BACKGROUND_SURFACE_HIGH};
|
|
object2.syncRow = {marginTop: 24};
|
|
const object3 = {};
|
|
const PRIMARY_SEMIBOLD = Fonts.PRIMARY_SEMIBOLD;
|
|
object3.fontFamily = PRIMARY_SEMIBOLD;
|
|
const INTERACTIVE_TEXT_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_ACTIVE;
|
|
object3.color = INTERACTIVE_TEXT_ACTIVE;
|
|
object2.formText = object3;
|
|
const TEXT_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_SUBTLE;
|
|
object2.info = {'marginTop': 8, 'fontSize': 14, 'lineHeight': 18, 'paddingHorizontal': 16, color: TEXT_SUBTLE};
|
|
const env0_10 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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 = (require(7972) /* metro dependency 7972: native */).FormRow;
|
|
const formRowProps3 = {DEPRECATED_style: [styles.formRow, styles.syncRow]};
|
|
const FormRow2 = (require(7972) /* metro dependency 7972: native */).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 = (require(7972) /* metro dependency 7972: native */).FormRow;
|
|
let Checkbox = FormRow3.Checkbox;
|
|
formRowProps3.trailing = <Checkbox selected={r14} />;
|
|
const items2 = [<FormRow {...formRowProps3} />];
|
|
const FormText = (require(7972) /* metro dependency 7972: native */).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})}</FormText>;
|
|
const FormTitle = (require(7972) /* metro dependency 7972: native */).FormTitle;
|
|
items2[4] = <FormTitle title={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['0t2wRW'])} thinTitle />;
|
|
const formRowProps = {DEPRECATED_style: styles.formRow};
|
|
const FormRow4 = (require(7972) /* metro dependency 7972: native */).FormRow;
|
|
Label = FormRow4.Label;
|
|
formRowProps.label = <Label style={styles.formText} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+'])} />;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).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 = (require(7972) /* metro dependency 7972: native */).FormRow;
|
|
Checkbox = FormRow5.Checkbox;
|
|
formRowProps.trailing = <Checkbox selected={allowPhone} />;
|
|
items2[5] = <FormRow {...formRowProps} />;
|
|
const formRowProps2 = {DEPRECATED_style: styles.formRow};
|
|
const FormRow6 = (require(7972) /* metro dependency 7972: native */).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 = (require(7972) /* metro dependency 7972: native */).FormRow;
|
|
Checkbox = FormRow7.Checkbox;
|
|
formRowProps2.trailing = <Checkbox selected={allowEmail} />;
|
|
items2[6] = <FormRow {...formRowProps2} />;
|
|
const view = <View style={styles.container}>{items2}</View>;
|
|
const ActionSheet = (require(6805) /* metro dependency 6805: ActionSheetNative */).ActionSheet;
|
|
return (
|
|
<ActionSheet startExpanded>
|
|
{view}
|
|
</ActionSheet>
|
|
);
|
|
}
|
|
|
|
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 = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
return (
|
|
<Text
|
|
onPress={(require(11997) /* metro dependency 11997: ContactSyncUtils */).handleOpenLearnMoreLink}
|
|
variant="text-sm/medium"
|
|
color="text-link"
|
|
key={a1}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
}
|
|
|