<template>
    <div v-if="modelValue.go">
        <v-img :src="`/asset/thumb/${modelValue.go}.webp`" />
        <div class="text-caption text-center">{{ modelValue.title }}</div>
        <v-checkbox density="compact" v-model="modelValue.playInHud" hide-details :label="l.viewInHUD"></v-checkbox>
        <v-textarea :label="l.description" v-model="modelValue.description"></v-textarea>
    </div>
    <asset-selector @select="assignVideoObject" :type="['Video']">
        <template v-slot:activator="props">
            <v-btn v-bind="props" prepend-icon="mdi-video-box" color="deep-orange-darken-4" block>{{ l.chooseVideoObject }}</v-btn>
        </template>
    </asset-selector>
</template>

<script>

export default {
    data(){
        return {
            active: false
        }
    },
    mounted(){
        this.active = true;
    },
    props:{
        modelValue: Object
    },
    methods:{
        assignVideoObject(e){
            this.modelValue.go = e.id;
            this.modelValue.title = e.name
        }
    }
}
</script>