<template>
    <div v-if="modelValue.go">
        <v-select :label="l.dimensions" v-model="modelValue.dimension" :items="['3x3', '5x4', '6x6']" density="compact"></v-select>
        <v-textarea :label="l.description" v-model="modelValue.introText"></v-textarea>
        <v-img :src="`/asset/thumb/${modelValue.go}.webp`" />
        <div class="text-caption text-center">{{ modelValue.title }}</div>
    </div>
    <asset-selector @select="assignTexture" :type="['Texture', 'Video']">
        <template v-slot:activator="props">
            <v-btn v-bind="props" prepend-icon="mdi-video-box" color="deep-orange-darken-4" block>{{ l.chooseImage }}</v-btn>
        </template>
    </asset-selector>
</template>

<script>

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