const html = require('choo/html');
const progress = require('./progress');
const { bytes } = require('../utils');
const fxPromo = require('./fxPromo');
module.exports = function(state, emit) {
const transfer = state.transfer;
const div = html`
${state.translate(
'downloadingPageProgress',
{
filename: state.fileInfo.name,
size: bytes(state.fileInfo.size)
}
)}
${state.translate('downloadingPageMessage')}
${progress(transfer.progressRatio)}
${state.translate(
transfer.msg,
transfer.sizes
)}
${state.promo === 'body' ? fxPromo(state, emit) : ''}
`;
return div;
};