<template>
  <footer class="app_footer">
    &copy;
    <a href="https://td2.info.pl/profile/?u=20777" target="_blank">Spythere</a>
    {{ new Date().getUTCFullYear() }} |
    <button class="btn--text" @click="openUpdateCard">
      v{{ version }}{{ isOnProductionHost ? '' : 'dev' }}
    </button>

    <div style="display: none">&int; ukryta taktyczna całka do programowania w HTMLu</div>
  </footer>
</template>

<script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
  emits: ['openUpdateCard'],
  props: {
    isUpdateCardOpen: {
      type: Boolean,
      required: true
    },
    version: String,
    isOnProductionHost: Boolean
  },

  methods: {
    openUpdateCard() {
      this.$emit('openUpdateCard');
    }
  }
});
</script>
