<template>
    <v-sheet
        class="d-flex justify-space-between mb-1 text-body-2"
    >
        <div v-if="!! usercurs.curs">
            {{ usercurs.curs.name}}
        </div>

        <div>
            <cs-btn 
                icon="mdi-chevron-right"
                tooltip="Deschide cursul"
                color="primary"
                @click="OnClickDeschidere"
            />
        </div>

    </v-sheet>
</template>

<script>
    export default {
        props: {
            usercurs: {required: true},
        },

        computed: {
            curs() {
                return this.usercurs.curs;
            }
        },

        methods: {
            OnClickDeschidere() {
                this.$emit('open-curs', this.usercurs);
            }
        },

        components: {
            CsBtn: require('@CsVueComp/buttons/CsBtn').default,
        },
        
        name: 'UserCursuriQuickListItem',
    }
</script>