<template>
    <div class="block">
        <barrio-select></barrio-select>
        <login></login>
        <input readonly v-model="nombre" type="hidden" name="name">
    </div>
</template>

<script>
import {mapActions, mapGetters, mapState} from "vuex";
import BarrioSelect from "./BarrioSelect.vue";
import Login from "./Login.vue";

export default {
    components: {
        BarrioSelect,
        Login,
    },
    async mounted() {
        await this.getRegiones();
    },
    computed: {
        ...mapGetters('login',["adminUrl"]),
        ...mapState('login',["grupo_de_compra_elegido"]),
        nombre() {
            return `${this.grupo_de_compra_elegido}${this.adminUrl ? '_admin' : ''}`;
        }
    },
    methods: {
        ...mapActions('login',["getRegiones"]),
    },
}
</script>

<style scoped></style>
