<template>
    <div class="app-bar theme-primary">
        <div class="app-bar-content">
            <span class="heading1">{{ translations.get("Title") }}</span>

            <a class="btn-primary theme-primary-l1" href="http://www.maramatanga.co.nz" target="_blank">
                <span class="material-icons mdi-m">open_in_new</span>
                <u>Ngā Pae o te Māramatanga (Replace with image)</u>
            </a>
        </div>
    </div>

    <div class="paper content">
        <DirectInput />
    </div>

    <!-- <ul id="transcription-list" class="list-view content">
        <transition-group name="transcription-list">
            <li class="list-item transcription-list-item" v-for="[id, transcription] in transcriptions" :key="id">
                <TranscriptionItem :transcription="transcription" />
            </li>
        </transition-group>
    </ul> -->
</template>

<style lang="scss">
#transcription-list {
    margin-bottom: 1em;
}

.app-bar {
    display: flex;
    flex-direction: column;
    gap: 1em;

    background-color: var(--bg-color);
    color: var(--fg-color);
    box-shadow: 0px 0px 4px 3px #6d6d6d;

    padding: 1em;
    margin-bottom: 1em;
}

.app-bar-content {
    display: flex;
    align-items: center;
    gap: 1em;

    width: 100%;

    & :first-child {
        flex-grow: 1;
    }
}

.content {
    margin: 1em;
}

// .transcription-list-item {
//     transition: all 0.8s ease;
//     margin-bottom: 1em;

//     &:last-child {
//         margin-bottom: 0;
//     }
// }

// .transcription-list-leave-to {
//     opacity: 0;
// }

// .transcription-list-leave-active {
//     position: absolute;
// }
</style>

<script>
import { mapState } from "vuex";
import DirectInput from "./components/DirectInput.vue"

export default {
    name: "App",
    components: {
        DirectInput
    },
    computed: mapState({
        translations: state => state.translations
    })
}
</script>
