<template>
  <div class="close-flashinfo-container">
    <div class="btn" @click="closeFlashInfo">{{ $_tr('close') }}</div>
  </div>
</template>

<script>
import { http } from '@inside-library/helpers/Http'

export default {
  name: 'close-flash-info-customs',
  $_i18nRootPath: 'customs.FLASHINFO',
  methods: {
    async closeFlashInfo() {
      try {
        await http.post('reaction/popin', {
          uuid: this.heritedData.uuid
        })
      } catch (err) {
        throw new Error(err)
      } finally {
        this.closeModal(this.heritedOptions.modalName)
      }
    }
  }
}
</script>

<style lang="scss">
.close-flashinfo-container {
  div.btn {
    padding: var(--spacing-s) var(--spacing-m);
    border-color: var(--color-light);
    background: transparent;

    &:hover {
      color: var(--color-thirdary);
      background: var(--color-light);
    }
  }
}
</style>
