<commit_before>import { Box, Button, Flex, Join, Separator, Serif, Spacer } from "@artsy/palette"
import SwitchBoard from "lib/NativeModules/SwitchBoard"
import React from "react"
import { Image, NativeModules, TouchableWithoutFeedback } from "react-native"

export default class MyProfile extends React.Component {
  render() {
    return (
      <Box px={2} py={1} mx={2} my={3}>
        <Flex alignItems="center">
          <Serif size="5">Settings</Serif>
        </Flex>
        <Separator m={2} />
        <Join separator={<Spacer mb={2} />}>
          <TouchableWithoutFeedback>
            <Flex flexDirection="row" justifyContent="space-between" alignItems="center">
              <Serif size="3t">Send Feedback</Serif>
              <Image source={require("../../../../images/horizontal_chevron.png")} />
            </Flex>
          </TouchableWithoutFeedback>
          <TouchableWithoutFeedback
            onPress={() => SwitchBoard.presentNavigationViewController(this, "privacy-request")}
          >
            <Flex flexDirection="row" justifyContent="space-between" alignItems="center">
              <Serif size="3t">Personal Data Request</Serif>
              <Image source={require("../../../../images/horizontal_chevron.png")} />
            </Flex>
          </TouchableWithoutFeedback>
          <Button
            variant="primaryBlack"
            block
            size="large"
            mt={3}
            onPress={() => NativeModules.ARNotificationsManager.postNotificationName("ARUserRequestedLogout", {})}
          >
            Logout
          </Button>
        </Join>
      </Box>
    )
  }
}

// <>
//   <Serif>TODO: Implement this according to designs. See: MX-141.</Serif>
//   <TouchableWithoutFeedback onPress={() => SwitchBoard.presentNavigationViewController(this, "privacy-request")}>
//     <Serif>Take me to the new privacy view controller</Serif>
//   </TouchableWithoutFeedback>
//   <Button
//     variant="primaryBlack"
//     onPress={() => NativeModules.ARNotificationsManager.postNotificationName("ARUserRequestedLogout", {})}
//   >
//     Logout
//   </Button>
// </><commit_msg>Refactors UI for settings screen.<commit_after>import { Box, Button, Flex, Join, Separator, Serif, Spacer } from "@artsy/palette"
import SwitchBoard from "lib/NativeModules/SwitchBoard"
import React from "react"
import { Image, NativeModules, TouchableWithoutFeedback } from "react-native"

export default class MyProfile extends React.Component {
  render() {
    return (
      <>
        <Box px={2} py={2} mx={2} mb={2} mt={2}>
          <Flex alignItems="center">
            <Serif size="5">Settings</Serif>
          </Flex>
        </Box>
        <Separator />
        <Box px={2} py={1} mx={2} mt={2}>
          <Join separator={<Spacer mb={2} />}>
            <Row title="Send Feedback" />
            <Row
              title="Personal Data Request"
              onPress={() => SwitchBoard.presentNavigationViewController(this, "privacy-request")}
            />
            <Button
              variant="primaryBlack"
              block
              size="large"
              mt={3}
              onPress={() => NativeModules.ARNotificationsManager.postNotificationName("ARUserRequestedLogout", {})}
            >
              Logout
            </Button>
          </Join>
        </Box>
      </>
    )
  }
}

const Row: React.FC<{ title: string; onPress?: () => void }> = ({ title, onPress }) => (
  <TouchableWithoutFeedback onPress={onPress}>
    <Flex flexDirection="row" justifyContent="space-between" alignItems="center">
      <Serif size="3t">{title}</Serif>
      <Image source={require("../../../../images/horizontal_chevron.png")} />
    </Flex>
  </TouchableWithoutFeedback>
)
{'fraction_non_alphanumeric': 0.15341515474919956, 'fraction_numerical': 0.006937033084311633, 'mean_word_length': 2.3866305329719966, 'pattern_counts': {'":': 0, '<': 65, '<?xml version=': 0, '>': 73, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4723725', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1066, 'n_words': 212}