<template>
    <div class="w-full leading-normal">
        <div @click="redirect_href('twitter')" class="flex group cursor-pointer hover:text-white hover:bg-indigo p-4 border-b">
            <p class="font-bold text-lg mb-1 group-hover:text-white fix-fa-inlined"><fa-layers full-width class="fa flex-none align-middle"><fa :icon="faTwitter" /></fa-layers> <span class="pl-2">Twitter</span></p>
        </div>
        <div @click="redirect_href('github')" class="flex group cursor-pointer hover:text-white hover:bg-indigo p-4 border-b">
            <p class="font-bold text-lg mb-1 group-hover:text-white fix-fa-inlined"><fa-layers full-width class="fa flex-none align-middle"><fa :icon="faGithub" /></fa-layers> <span class="pl-2">Github</span></p>
        </div>
        <div @click="redirect_href('linkedin')" class="flex group cursor-pointer hover:text-white hover:bg-indigo p-4 border-b">
            <p class="font-bold text-lg mb-1 group-hover:text-white fix-fa-inlined"><fa-layers full-width class="fa flex-none align-middle"><fa :icon="faLinkedin" /></fa-layers> <span class="pl-2">Linkedin</span></p>
        </div>
        <div @click="redirect_href('blog')" class="flex group cursor-pointer hover:text-white hover:bg-indigo p-4">
            <p class="font-bold text-lg mb-1 group-hover:text-white fix-fa-inlined"><fa-layers full-width class="fa flex-none align-middle"><fa :icon="faWordpress" /></fa-layers> <span class="pl-2">Blog</span></p>
        </div>
    </div>
</template>

<script>
import { faGithub, faLinkedin, faTwitter, faWordpress } from '@fortawesome/free-brands-svg-icons'

export default {
  methods: {
    redirect_href (profile) {
        switch (profile) {
            case "linkedin":
                window.open("//www.linkedin.com/in/rhnvrm/", '_blank')
                break;
            case "twitter":
                window.open("//twitter.com/rhnvrm", '_blank')
                break;
            case "github":
                window.open("//github.com/rhnvrm", '_blank')
                break;
            case "blog":
                window.open("//blog.rohanverma.net/", '_blank')
                break;

            default:
                break;
        }
    }
  },
  computed: {
    faGithub () {
        return faGithub
    },
    faLinkedin () {
        return faLinkedin
    },
    faTwitter () {
        return faTwitter
    },
    faWordpress () {
        return faWordpress
    }
  },
}
</script>
