<template>
	<div>
		<span>{{ formatTimer(new Date(player.currentTime*1000)) }}</span>
		<span>/</span>
		<span>{{ formatTimer(new Date(player.duration*1000)) }}</span>
	</div>
</template>

<script>
import { formatTimer } from '../../utils/time.js'

export default {
	name: 'Timer',
	computed: {
		player() {
			return this.$store.state.player
		},
	},
	methods: {
		formatTimer,
	},
}
</script>

<style scoped>
	div {
		align-items: center;
		display: flex;
		gap: 5px;
		justify-content: center;
	}
</style>
