<template>
  <div id="popup" class="ol-popup">
    <div class="mapboxgl-popup-content">
      <div id="popup-content" class="popup-content"></div>
      <div class="popup-space"></div>
      <div class="popup-point"></div>
      <button class="mapboxgl-popup-close-button" @click="closePopup" type="button" aria-label="Close popup"
              aria-hidden="true">×
      </button>
    </div>
  </div>
</template>

<script lang="ts">
import {Component, Vue} from 'vue-property-decorator'
import storeUtil from "@/util/store";

@Component({})
export default class OnClickWeather extends Vue {
  private closePopup() {
    (storeUtil.getMapFun() as any).removePopupOverlay()
  }
}
</script>

<style scoped lang="scss">
.ol-popup {
  display: none;
  position: absolute;
  bottom: 0;
  width: 10rem;

  .mapboxgl-popup-content {
    position: relative;
    border-radius: 0.1875rem;
  }

  .mapboxgl-popup-content .popup-content {
    width: 100%;
    height: 2.5rem;
    line-height: 2.5rem;
    background-color: rgba(35, 32, 87, 0.6);
    align-self: flex-end;
    text-align: center;
  }

  .mapboxgl-popup-content .popup-space {
    width: 0.25rem;
    height: 5.125rem;
    background-color: rgba(35, 32, 87, 0.6);
  }

  .mapboxgl-popup-content .popup-point {
    position: relative;
    background-color: rgba(35, 32, 87, 0.6);
    left: -0.125rem;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;

  }

  .mapboxgl-popup-content .popup-content p {
    font-size: 1rem;
    color: white;
    margin: 0;
  }

  .mapboxgl-popup-close-button {
    pointer-events: auto !important;
    font-size: 1rem;
    color: #a7a7a7;
    position: absolute;
    right: 0;
    top: 0;
    border: 0;
    border-radius: 0 0.1875rem 0 0;
    cursor: pointer;
    background-color: transparent;
  }
}
</style>
