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

export default {
    name: "OllasNavBar",
    components: { Burger, ChismosaDropdown },
    computed: {
        ...mapGetters('pedido', ["pedidoDefinido"]),
        ...mapState('pedido', ["nombre", "grupo_de_compra"]),
        ...mapState('ui', ["burger_activa"])
    },
    methods: {
        ...mapMutations('ui', ["toggleBurger"]),
    }
}
</script>

<template>
    <div>
        <div class="navbar-item hide-below-1024">
            <p v-if="pedidoDefinido">{{ nombre }}</p>
            <p v-else>{{ grupo_de_compra.nombre }}</p>
        </div>
        <chismosa-dropdown
            v-if="pedidoDefinido"
            class="hide-above-1023"
            ariaControls="mobile"/>
        <burger/>
    </div>
</template>

<style scoped>

</style>
