<template>
  <div class="dashboard-footer">
    <div class="copyright">
      ©{{ year }} Fintax (PT Fintek Integrasi Digital ). All Rights Reserved.
    </div>
    <ul>
      <li v-for="(item, index) in list" :key="index">
        <router-link v-if="item.to" :to="item.to">
          {{ item.label }}
        </router-link>
        <a v-else-if="item.href" :href="item.href" target="__blank">
          {{ item.label }}
        </a>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  props: {
    list: {
      type: [Array],
    },
  },
  data() {
    return {
      year: "",
    };
  },
  mounted() {
    this.year = new Date().getFullYear();
  },
};
</script>

<style lang="scss">
@use "@/assets/style/_color.scss" as *;

.dashboard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;

  .copyright {
    color: #a3a3a3;
  }

  ul {
    padding: 0px;
    list-style: none;
    margin: 0px;
    display: flex;

    li {
      margin-right: 32px;

      a {
        text-decoration: none;
        color: $dark-blue-4;
        font-weight: 600;
        cursor: pointer;
      }
    }

    li:last-child {
      margin-right: 0px;
    }
  }
}
</style>
