<template>
    <div class="dropdown is-right navbar-item" :class="{'is-active':activa}">
        <div class="dropdown-trigger">
            <a class="text-a" aria-haspopup="true" :aria-controls="id" @click.capture="toggle">
            <span class="icon is-small mr-1">
                <img src="/assets/chismosa.png">
            </span>
            <span v-text="'$' + this.$limpiarInt($root.devoluciones ? $root.pedido.total_menos_devoluciones : $root.pedido.total)"></span>
            </a>
        </div>
    </div>
</template>

<script>
import Chismosa from './Chismosa.vue'
export default {
    components: {
        Chismosa
    },
    props: {
        id: {
            type: String,
            required: true
        }
    },
    data() {
        return {
            activa: false
        }
    },
    methods: {
        toggle() {
            this.activa = !this.activa;
            Event.$emit("toggle-chismosa");
        },
    },
}
</script>
