<script>
import { mapActions, mapGetters, mapMutations, mapState } from "vuex";
import ChismosaDropdown from "../pedidos/ChismosaDropdown.vue";

export default {
    name: "OllasNavBarBrand",
    components: { ChismosaDropdown },
    computed: {
        ...mapGetters('pedido', ["pedidoDefinido"]),
        ...mapGetters('ollas', ["montoTotal"]),
        ...mapState('ui', ["burger_activa"]),
        ...mapState('pedido', ["nombre"]),
    },
    methods: {
        ...mapActions('ollas', ["getMontoPorOlla"]),
        ...mapMutations('ui', ["toggleBurger"]),
    },
    async mounted() {
        await this.getMontoPorOlla();
    }
}
</script>

<template>
    <div class="navbar-item hide-below-1024">
        <p v-if="pedidoDefinido">{{ `${nombre} - Monto total: ${montoTotal}` }}</p>
        <chismosa-dropdown
            v-if="pedidoDefinido"
            class="hide-above-1023"
            ariaControls="mobile"/>
    </div>
</template>

<style scoped>
</style>
