const FormattedMessage = require('react-intl').FormattedMessage; const injectIntl = require('react-intl').injectIntl; const intlShape = require('react-intl').intlShape; const React = require('react'); const FlexRow = require('../../components/flex-row/flex-row.jsx'); const bindAll = require('lodash.bindall'); const Page = require('../../components/page/www/page.jsx'); const render = require('../../lib/render.jsx'); const detectOS = require('../../lib/detect-os.js').default; const OS_ENUM = require('../../lib/os-enum.js'); const {CHROME_APP_RELEASED} = require('../../lib/feature-flags.js'); const OSChooser = require('../../components/os-chooser/os-chooser.jsx'); const InstallScratch = require('../../components/install-scratch/install-scratch.jsx'); const {isDownloaded, isFromGooglePlay} = require('../../components/install-scratch/install-util.js'); require('./download.scss'); require('../../components/forms/button.scss'); class Download extends React.Component { constructor (props) { super(props); bindAll(this, [ 'onSetOS' ]); this.state = { OS: detectOS() }; } onSetOS (os) { this.setState({ OS: os }); } render () { return (