const html = require('choo/html'); const modal = require('./modal'); module.exports = function(state, emit) { let strings = {}; let why = ''; let url = ''; if (state.params.reason !== 'outdated') { strings = unsupportedStrings(state); why = html` ${state.translate('notSupportedLink')} `; url = 'https://www.mozilla.org/firefox/new/?utm_campaign=send-acquisition&utm_medium=referral&utm_source=send.firefox.com'; } else { strings = outdatedStrings(state); url = 'https://support.mozilla.org/kb/update-firefox-latest-version'; } return html`
${state.modal && modal(state, emit)}

${strings.header}

${strings.description}

${why} ${strings.button}
`; }; function outdatedStrings(state) { return { header: state.translate('notSupportedHeader'), description: state.translate('notSupportedOutdatedDetail'), button: state.translate('updateFirefox') }; } function unsupportedStrings(state) { return { header: state.translate('notSupportedHeader'), description: state.translate('notSupportedDescription'), button: state.translate('downloadFirefox') }; }