<template>
    <v-list-item 
        dense
        :disabled="disabled"
        :class="{
            'menu-item-is-disabled': disabled,
        }"
    >
        <item-option 
            :item="item"
        />
    </v-list-item>
</template>

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

        computed: {
            disabled() {
                if( _.isBoolean(this.item.disabled) )
                {
                    return this.item.disabled;
                }
                if( _.isFunction(this.item.disabled) )
                {
                    return this.item.disabled();
                }
                return false;
            },
        },
        
        components: {
            ItemOption: require('./../../../~parts/ItemOption').default,
        },

        name: 'SimpleItem',
    }
</script>