const html = require('choo/html'); const raw = require('choo/html/raw'); const modal = require('./modal'); module.exports = function(state, emit) { return html`
${state.modal && modal(state, emit)}

${state.translate('legalTitle')}

${state.translate('legalDateStamp')}

${raw( replaceLinks(state.translate('legalNoticeSend'), [ 'https://www.mozilla.org/privacy/', 'https://github.com/mozilla/send/blob/master/docs/metrics.md' ]) )}
  • ${state.translate('legalNoticeSendContentHeader')}: ${state.translate('legalNoticeSendContent')}
  • ${state.translate('legalNoticeSendDataHeader')}: ${state.translate('legalNoticeSendData')}
  • ${state.translate('legalNoticeSendPersonalHeader')}: ${state.translate('legalNoticeSendPersonal')}:
    • ${state.translate('legalNoticeSendIPHeader')}: ${state.translate('legalNoticeSendIP')}
    • ${state.translate('legalNoticeSendFXAHeader')}: ${state.translate('legalNoticeSendFXA')}
  • ${state.translate('legalNoticeSendNonPersonalHeader')}: ${state.translate('legalNoticeSendNonPersonal')}:
    • ${state.translate('legalNoticeSendInteractionHeader')}: ${state.translate('legalNoticeSendInteraction')}
    • ${state.translate('legalNoticeSendTechnicalHeader')}: ${state.translate('legalNoticeSendTechnical')}
  • ${state.translate('legalNoticeSendThirdPartyHeader')}: ${state.translate('legalNoticeSendThirdParty')}
`; }; function replaceLinks(str, urls) { let i = 0; const s = str.replace( /([^<]+)<\/a>/g, (m, v) => `${v}` ); return `

${s}

`; }