<template>
  <div class="topbar">
    <IdCard v-if="lgAndUp" />

    <v-spacer />

    <div class="icon-links">
      <LanguageSelector class="mr-3" />

      <ThemeSwitcher />

      <nuxt-link
          href="https://github.com/olinox14"
          target="_blank"
          :aria-label="i18n.t('Find me on Github')"
          class="logo"
      >
        <v-icon>fab fa-github</v-icon>
      </nuxt-link>

      <nuxt-link
          href="https://stackoverflow.com/users/4279120/olinox14"
          target="_blank"
          :aria-label="i18n.t('Find me on Stackoverflow')"
          class="logo"
      >
        <v-icon>fab fa-stack-overflow</v-icon>
      </nuxt-link>

      <nuxt-link
          href="https://www.linkedin.com/in/olivier-massot-60b87b181"
          target="_blank"
          :aria-label="i18n.t('Find me on LinkedIn')"
          class="logo"
      >
        <v-icon>fab fa-linkedin</v-icon>
      </nuxt-link>
    </div>
  </div>
</template>

<script setup lang="ts">
  import ThemeSwitcher from "~/components/ThemeSwitcher.vue";
  import { useDisplay } from 'vuetify'

  const i18n = useI18n()

  const { lgAndUp }= useDisplay()
</script>

<style scoped lang="scss">
.topbar {
  height: 64px;
  display: flex;
  flex-direction: row;
  margin: 0;
  padding: 18px;

  @media (max-width: 1280px) {
    margin: 0 10%;
  }

  @media (max-width: 600px) {
    margin: 0 5%;
  }

  .v-btn {
    color: rgb(var(--v-theme-on-background));
  }

  .icon-links {
    font-size: 14px;
    display: flex;
    flex-direction: row;
    align-items: center;

    > * {
      margin-left: 24px;

      @media (max-width: 540px) {
        margin-left: 4px;
      }
    }

    .logo {
      padding: 4px;
    }

    a {
      color: rgb(var(--v-theme-on-background--clickable));
    }
  }
}
</style>