<commit_before>import * as React from 'react'
import * as Kb from '../../../../common-adapters/mobile.native'
import * as Styles from '../../../../styles'
import {Props} from '.'
import {isIOS} from '../../../../constants/platform'

const Prompt = () => (
  <Kb.Box2 direction="horizontal" fullWidth={true} gap="xtiny" style={styles.promptContainer}>
    <Kb.Text type="BodySmallSemibold">Select attachment type</Kb.Text>
  </Kb.Box2>
)

const styles = Styles.styleSheetCreate(
  () =>
    ({
      promptContainer: {
        alignItems: 'center',
        justifyContent: 'center',
        paddingBottom: 24,
        paddingTop: 24,
      },
    } as const)
)

class FilePickerPopup extends React.Component<Props> {
  render() {
    const iosItems: Kb.MenuItems = [
      {
        icon: 'iconfont-camera',
        onClick: () => this.props.onSelect('mixed', 'camera'),
        title: 'Take Photo or Video',
      },
      {
        icon: 'iconfont-photo-library',
        onClick: () => this.props.onSelect('mixed', 'library'),
        title: 'Choose from Library',
      },
    ]

    const androidItems: Kb.MenuItems = [
      {icon: 'iconfont-camera', onClick: () => this.props.onSelect('photo', 'camera'), title: 'Take Photo'},
      {icon: 'iconfont-film', onClick: () => this.props.onSelect('video', 'camera'), title: 'Take video'},
      {
        icon: 'iconfont-photo-library',
        onClick: () => this.props.onSelect('photo', 'library'),
        title: 'Photo from Library',
      },
      {
        icon: 'iconfont-video-library',
        onClick: () => this.props.onSelect('video', 'library'),
        title: 'Video from Library',
      },
    ]
    const items = isIOS ? iosItems : androidItems

    const header = {
      title: 'header',
      view: <Prompt />,
    }

    return (
      <Kb.FloatingMenu
        header={header}
        attachTo={this.props.attachTo}
        items={items}
        onHidden={this.props.onHidden}
        visible={this.props.visible}
        closeOnSelect={true}
      />
    )
  }
}

export default FilePickerPopup<commit_msg>fix capitalization of media options (#21915)<commit_after>import * as React from 'react'
import * as Kb from '../../../../common-adapters/mobile.native'
import * as Styles from '../../../../styles'
import {Props} from '.'
import {isIOS} from '../../../../constants/platform'

const Prompt = () => (
  <Kb.Box2 direction="horizontal" fullWidth={true} gap="xtiny" style={styles.promptContainer}>
    <Kb.Text type="BodySmallSemibold">Select attachment type</Kb.Text>
  </Kb.Box2>
)

const styles = Styles.styleSheetCreate(
  () =>
    ({
      promptContainer: {
        alignItems: 'center',
        justifyContent: 'center',
        paddingBottom: 24,
        paddingTop: 24,
      },
    } as const)
)

class FilePickerPopup extends React.Component<Props> {
  render() {
    const iosItems: Kb.MenuItems = [
      {
        icon: 'iconfont-camera',
        onClick: () => this.props.onSelect('mixed', 'camera'),
        title: 'Take photo or video',
      },
      {
        icon: 'iconfont-photo-library',
        onClick: () => this.props.onSelect('mixed', 'library'),
        title: 'Choose from library',
      },
    ]

    const androidItems: Kb.MenuItems = [
      {icon: 'iconfont-camera', onClick: () => this.props.onSelect('photo', 'camera'), title: 'Take photo'},
      {icon: 'iconfont-film', onClick: () => this.props.onSelect('video', 'camera'), title: 'Take video'},
      {
        icon: 'iconfont-photo-library',
        onClick: () => this.props.onSelect('photo', 'library'),
        title: 'Photo from library',
      },
      {
        icon: 'iconfont-video-library',
        onClick: () => this.props.onSelect('video', 'library'),
        title: 'Video from library',
      },
    ]
    const items = isIOS ? iosItems : androidItems

    const header = {
      title: 'header',
      view: <Prompt />,
    }

    return (
      <Kb.FloatingMenu
        header={header}
        attachTo={this.props.attachTo}
        items={items}
        onHidden={this.props.onHidden}
        visible={this.props.visible}
        closeOnSelect={true}
      />
    )
  }
}

export default FilePickerPopup
{'fraction_non_alphanumeric': 0.16933365177931695, 'fraction_numerical': 0.004060186290900406, 'mean_word_length': 2.4215686274509802, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 33, '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': '4154913', 'n_tokens_mistral': 1296, 'n_tokens_neox': 1288, 'n_words': 272}