<template>
  <div class="mapzoom">
    <div class="mapzoom__selector">
      <div class="mapzoom__controllers first-child">
        <ods-button icon="ods-icon-minus" plain @click="zoomOut()" />
        <ods-button icon="ods-icon-plus" plain @click="zoomIn()" />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'map-zoom',
  data() {
    return {
      zoomOptionSelect: '150',
      z3D: true,
      zoomOptions: [
        {
          value: '50',
          label: 'Distrito',
        },
        {
          value: '150',
          label: 'Municipio',
        },
      ],
    };
  },
  methods: {
    zoomIn() {
      this.$emit('zoomIn');
    },
    zoomOut() {
      this.$emit('zoomOut');
    },
  },
};
</script>

<style lang="scss" scoped>
.mapzoom {
  position: absolute;
  bottom: 30px;
  right: 30px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  width: 81px;
  height: auto;
  opacity: 1;
  transition: opacity 0.5s;
  &__selector {
    position: relative;
    margin: 0;
    padding: 0;
    + .mapzoom__controllers {
      margin-top: 8px;
      margin-bottom: 8px;
      &.first-child {
        margin-bottom: 5px;
      }
    }
  }
  &__controllers {
    position: relative;
    background-color: $--color-white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    display: flex;
    &::after {
      content: "";
      display: block;
      position: absolute;
      margin: 10px 0;
      left: 40px;
      /* left: 6px; */
      width: 1px;
      height: 16px;
      background-color: $--color-neutral-3;
      pointer-events: none;
    }
    .ods-button {
      margin: 0;
      padding: 0;
      width: 40px;
      height: 36px;
      padding-top: 4px;
      border-radius: 0;
      background-color: $--color-white;
      border-radius: 2px 0 0 2px;
      border: 0;
      cursor: pointer;
      outline: 0;
      &:hover {
        background: $--color-primary;
        color: $--color-white;
      }
      &:focus,
      &:active {
        background: $--color-white;
        color: $--color-primary;
      }
      i {
        margin-left: 0;
      }
      + .ods-button {
        border-radius: 0 2px 2px 0;
        margin-left: 1px;
        box-shadow: none;
      }
    }
  }
}
</style>
