<template v-if="activeJob">
    <button type="button" class="btn" @click="clearActiveJob(true)" data-icon="larr" title="{{ 'Back to the queue index'|t('app') }}">{{ 'Back'|t('app') }}</button>
    <div class="flex-grow"></div>
    <div v-if="loading" class="spinner"></div>
    <button type="button" v-if="isRetryable(activeJob)" class="btn" data-icon="play" @click="retryActiveJob">
        <template v-if="activeJob.status == 2">{{ 'Restart job'|t('app') }}</template>
        <template v-else>{{ 'Retry'|t('app') }}</template>
    </button>
    <button v-if="activeJob.status != 3" class="btn" data-icon="remove" @click="releaseActiveJob">{{ 'Release job'|t('app') }}</button>
</template>
<template v-else-if="jobs.length">
    <div class="flex-grow"></div>
    <button type="button" class="btn" data-icon="play" @click="retryAll">{{ 'Retry all failed jobs'|t('app') }}</button>
    <button type="button" class="btn" data-icon="remove" @click="releaseAll">{{ 'Release all jobs'|t('app') }}</button>
</template>
