export function updatePresentation(state) { const busy = [ 'checking', 'downloading', 'verifying', 'installing', 'restarting', ].includes(state.phase); return { busy, message: `update_${state.phase}`, canInstall: Boolean(state.version) && !busy, showProgress: ['downloading', 'verifying', 'installing'].includes( state.phase, ), }; }