<script setup>
import { useI18n } from "vue-i18n";

const { t, locale } = useI18n();
const currentLanguage = locale.value;
</script>

<template>
  <div class="navbar">
    <div class="d-flex align-center w-100">
      <router-link to="/">
        <img src="../assets/img/logo.svg" alt="" class="logo" />
      </router-link>
      <h1>{{ t("title") }}</h1>
    </div>

    <div class="d-flex align-center pt-1">
      <!-- <img src="../assets/img/icon/素材-01.png" alt="" width="50" /> -->
      <a
        :href="`http://172.104.93.163:3219/static/index.html#/${currentLanguage}`"
      >
        <img src="../assets/img/icon/素材-15.png" alt="" width="50" />
      </a>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.navbar {
  height: 7vh;
  position: sticky;
  z-index: 1000;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 10px;
  background-color: #fafcf7;
  box-shadow: 0px 2px 3px rgba(0, 0, 0, 0.15);

  .logo {
    width: 100%;
    max-width: 80px;
  }

  h1 {
    margin-left: 15px;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--main-color);

    @media (max-width: 414px) {
      font-size: 1rem;
    }
  }
}
</style>
