<script setup lang="ts">
const config = useAppConfig()
const fqdn = config.url.split('//')[1]

const socials = [
  {
    name: 'YouTube',
    url: `${config.shortener}/youtube`,
    icon: {
      name: 'logos:youtube-icon',
      color: 'white',
    },
  },
  {
    name: 'Andrew',
    url: `${config.shortener}/andrew`,
    icon: {
      name: 'logos:youtube-icon',
      color: 'white',
    },
  },
  {
    name: 'Twitch',
    url: `${config.shortener}/twitch`,
    icon: {
      name: 'fa:twitch',
      color: '#B68CFF',
    },
  },
  {
    name: 'TikTok',
    url: `${config.shortener}/tiktok`,
    icon: {
      name: 'logos:tiktok-icon',
      color: 'white',
    },
  },
  {
    name: 'Twitter',
    url: `${config.shortener}/twitter`,
    icon: {
      name: 'logos:twitter',
      color: 'white',
    },
  },
  {
    name: 'Telegram',
    url: `${config.shortener}/telegram`,
    icon: {
      name: 'logos:telegram',
      color: 'white',
    },
  },
  {
    name: 'Discord',
    url: `${config.shortener}/discord`,
    icon: {
      name: 'logos:discord-icon',
      color: 'white',
    },
  },
  {
    name: 'GitHub',
    url: `${config.shortener}/github`,
    icon: {
      name: 'fa:github',
      color: 'white',
    },
  },
  {
    name: 'Steam',
    url: `${config.shortener}/steam`,
    icon: {
      name: 'fa:steam',
      color: 'white',
    },
  },
]

const meta = {
  title: 'Enderman Online',
  description:
    'Discover me on your favorite social media and find ways to contact me here.',
  image: `${config.url}/images/logo.png`,
  url: `${config.url}/projects`,
}

useSeoMeta({
  title: meta.title,
  description: meta.description,
  ogTitle: meta.title,
  ogDescription: meta.description,
  ogImage: meta.image,
  ogUrl: meta.url,
  ogType: 'website',
  twitterTitle: meta.title,
  twitterDescription: meta.description,
  twitterImage: meta.image,
  twitterCard: 'summary',
})

useHead({
  title: 'Socials',
  htmlAttrs: {
    lang: config.locale || 'en',
  },
  link: [
    {
      rel: 'icon',
      type: 'image/x-icon',
      href: '/favicon.ico',
    },
  ],
})
</script>

<template>
  <section>
    <h3 class="alex">Online presence</h3>
    <Separator />
    <p>
      <strong>🚧 This page is currently under construction.</strong> Expect a
      lot more content to be added as time passes.
      <em>Please report all bugs you encounter via the link in the footer</em>,
      I will make sure to sand them down.
    </p>
    <Separator />
    <div class="row">
      <div class="col-12 col-md-3">
        <h5 class="alex">Social media</h5>
        <ul class="list-style-type-none p-0">
          <li v-for="(page, index) in socials" :key="index">
            <a class="link-hi" target="_blank" rel="noopener" :href="page.url">
              <Icon :name="page.icon.name" :color="page.icon.color" inline />
              <span class="mx-2">{{ page.name }}</span>
            </a>
          </li>
        </ul>
      </div>
      <div class="col-12 col-md-9">
        <h5 class="alex">Contact me</h5>
        <p>
          Personal:
          <EMail
            class="link-hi"
            :address="`contact@${fqdn}`"
            subject="Hey Enderman!"
          /><br />
          Manager: <EMail class="link-hi" :address="`manager@${fqdn}`" /><br />
          Abuse: <EMail class="link-hi" :address="`abuse@${fqdn}`" />
        </p>
      </div>
    </div>
  </section>
</template>
