const html = require('choo/html'); const raw = require('choo/html/raw'); const notFound = require('../notFound'); const deletePopup = require('../../templates/popup'); const uploadedFileList = require('../../templates/uploadedFileList'); const timeLimitText = require('../../templates/timeLimitText'); const { allowedCopy, delay } = require('../../utils'); const split = require('../split'); module.exports = function(state, emit) { const file = state.storage.getFileById(state.params.id); if (!file) { return notFound(state); } const passwordReminderClass = file._hasPassword ? '' : 'passwordReminder--hidden'; return split( state, uploadedFileList(file, state, emit), html`