const html = require('choo/html'); module.exports = function(name, url) { const dialog = function(state, emit, close) { return html`

${state.translate('notifyUploadEncryptDone')}

${state.translate('shareLinkDescription')}
${name}

`; async function share(event) { event.stopPropagation(); try { await navigator.share({ title: state.translate('-send-brand'), text: state.translate('shareMessage', { name }), url }); } catch (e) { if (e.code === e.ABORT_ERR) { return; } console.error(e); } close(); } }; dialog.type = 'share'; return dialog; };