<template>
    <v-card  outlined rounded :color="is_asociat ? 'orange darken-3' : 'grey'" :disabled="! is_asociat">
        <v-sheet class="pa-1 d-flex align-center justify-space-between">
            <v-sheet width="80">
                <v-img 
                    width="80"
                    contain
                    :src="$url + 'imgs/icons/' + registru.slug + '.png'"
                />
            </v-sheet>

            <v-sheet width="calc(100% - 110px)">
                {{ __(registru.name) }}
            </v-sheet>

            <v-sheet width="30">
                <cs-btn 
                    icon="mdi-chevron-right"
                    @click="OnClick"
                />
            </v-sheet>
            
        </v-sheet>
    </v-card>
</template>

<script>
    const Redirect = require('@CsFunc/global/Redirect');

    export default {
        props: {
            registru: {required: true},
            customer: {required: true},
            is_asociat: {default: false},
        },

        methods: {
            OnClick() {
                let url = this.$url + 'customer-registru/' + this.customer.id + '/' + this.registru.id;
                return Redirect(url);
            }
        },

        components: {
            CsBtn: require('@CsVueComp/buttons/CsBtn').default,
        },

        name: 'RegistreDashboardNavigatorItem',
    }
</script>