<template>
    <div class="dropdown is-right navbar-item" :class="{'is-active': show_chismosa}">
        <div class="dropdown-trigger">
            <a class="text-a" aria-haspopup="true" :aria-controls="ariaControls" @click.capture="toggleChismosa">
            <span class="icon is-small mr-1">
                <img src="/assets/chismosa.png">
            </span>
            <span v-text="'$' + total"></span>
            </a>
        </div>
    </div>
</template>

<script>
import Chismosa from './Chismosa.vue'
import { mapMutations, mapState } from "vuex";
export default {
    components: {
        Chismosa
    },
    props: {
        ariaControls: {
            type: String,
            required: true
        }
    },
    computed: {
        ...mapState('pedido',["total"]),
        ...mapState('ui',["show_chismosa"]),
    },
    methods: {
        ...mapMutations('ui',["toggleChismosa"]),
    },
}
</script>
