76 lines
3.1 KiB
TypeScript
76 lines
3.1 KiB
TypeScript
// Metro module 11778 (f11779).
|
|
import { View } from "react-native";
|
|
import { setAllowEmail, setAllowPhone, setAllowSync, useContactSyncModalStore } from "../ContactSyncModalStore";
|
|
import { Fonts } from "../../../../Constants";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { FormRow, FormText, FormTitle } from "../../../../design/void/Form/native/index";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { handleOpenLearnMoreLink } from "../ContactSyncUtils";
|
|
import { ActionSheet } from "../../../../design/components/Sheet/native/ActionSheet.native";
|
|
const useStyles = createStyles({
|
|
container: {
|
|
backgroundColor: Module712.colors.BACKGROUND_BASE_LOW,
|
|
paddingBottom: 16
|
|
},
|
|
formRow: {
|
|
marginTop: 8,
|
|
paddingVertical: 16,
|
|
backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH
|
|
},
|
|
syncRow: {
|
|
marginTop: 24
|
|
},
|
|
formText: {
|
|
fontFamily: Fonts.PRIMARY_SEMIBOLD,
|
|
color: Module712.colors.INTERACTIVE_TEXT_ACTIVE
|
|
},
|
|
info: {
|
|
marginTop: 8,
|
|
fontSize: 14,
|
|
lineHeight: 18,
|
|
paddingHorizontal: 16,
|
|
color: Module712.colors.TEXT_SUBTLE
|
|
}
|
|
});
|
|
export default function ContactSyncSettingsActionSheet() {
|
|
const styles = useStyles();
|
|
const contactSyncModalStore = useContactSyncModalStore();
|
|
const { allowPhone, allowEmail } = contactSyncModalStore;
|
|
const allowEmail2 = allowPhone ? allowPhone : allowEmail;
|
|
return <ActionSheet startExpanded>
|
|
<View style={styles.container}>
|
|
<FormRow DEPRECATED_style={[styles.formRow, styles.syncRow]} label={<FormRow.Label style={styles.formText} text={intl.string(t.a5QL24)} />} onPress={() => {
|
|
setAllowSync(!allowEmail2);
|
|
}} trailing={<FormRow.Checkbox selected={allowEmail2} />} />
|
|
<FormText style={styles.info}>
|
|
{intl.string(t.pfjsB5)}
|
|
</FormText>
|
|
<FormText style={styles.info}>
|
|
{intl.string(t.cW1nr9)}
|
|
</FormText>
|
|
<FormText style={styles.info}>
|
|
{intl.format(t.eswIfi, {
|
|
learnMoreHook: function learnMoreHook(a0, a1) {
|
|
return <Text key={a1} onPress={handleOpenLearnMoreLink} variant="text-sm/medium" color="text-link">
|
|
{a0}
|
|
</Text>;
|
|
}
|
|
})}
|
|
</FormText>
|
|
<FormTitle title={intl.string(t["0t2wRW"])} thinTitle />
|
|
<FormRow DEPRECATED_style={styles.formRow} label={<FormRow.Label style={styles.formText} text={intl.string(t["eJnn0+"])} />} subLabel={<Text variant="text-sm/medium" color="text-default">
|
|
{intl.string(t.X7pIKN)}
|
|
</Text>} onPress={() => {
|
|
setAllowPhone(!allowPhone);
|
|
}} trailing={<FormRow.Checkbox selected={allowPhone} />} />
|
|
<FormRow DEPRECATED_style={styles.formRow} label={<FormRow.Label style={styles.formText} text={intl.string(t.dI4d4S)} />} subLabel={<Text variant="text-sm/medium" color="text-default">
|
|
{intl.string(t.ilGsHE)}
|
|
</Text>} onPress={() => {
|
|
setAllowEmail(!allowEmail);
|
|
}} trailing={<FormRow.Checkbox selected={allowEmail} />} />
|
|
</View>
|
|
</ActionSheet>;
|
|
};
|