<?php
/* Copyright (C) 2022  MB Informatique         <info@mb-informatique.fr> */

class SignaturePage
{
    public function showSocialLinks()
    {
        global $conf, $langs;
        if ($conf->global->SIGNATURE_SOCIAL_LINKS == "true" && (!empty($conf->global->MAIN_INFO_SOCIETE_FACEBOOK_URL) || !empty($conf->global->MAIN_INFO_SOCIETE_TWITTER_URL) || !empty($conf->global->MAIN_INFO_SOCIETE_INSTAGRAM_URL) || !empty($conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL))) {
            echo "<div class='center' style='margin-top: 60px; margin-bottom: 20px; font-size: 16px;'>" . $langs->trans("FollowUsOnSocial") . " :</div>";
            echo "<div class='center'>";
            if (!empty($conf->global->MAIN_INFO_SOCIETE_FACEBOOK_URL)) {
                echo "<a href='" . $conf->global->MAIN_INFO_SOCIETE_FACEBOOK_URL . "' title='Facebook' target='_blank'><i class='fab fa-facebook-square fa-3x' style='color: #4267B2; margin: 8px; background-color: white;'></i></a>";
            }
            if (!empty($conf->global->MAIN_INFO_SOCIETE_TWITTER_URL)) {
                echo "<a href='" . $conf->global->MAIN_INFO_SOCIETE_TWITTER_URL . "' title='Twitter' target='_blank'><i class='fab fa-twitter-square fa-3x' style='color: #1DA1F2; margin: 8px; background-color: white;'></i></a>";
            }
            if (!empty($conf->global->MAIN_INFO_SOCIETE_INSTAGRAM_URL)) {
                echo "<a href='" . $conf->global->MAIN_INFO_SOCIETE_INSTAGRAM_URL . "' title='Instagram' target='_blank'><i class='fab fa-instagram fa-3x' style='color: #8a3ab9; margin: 8px; background: white; background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%,#d6249f 60%,#285AEB 90%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;'></i></a>";
            }
            if (!empty($conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL)) {
                echo "<a href='" . $conf->global->MAIN_INFO_SOCIETE_YOUTUBE_URL . "' title='Youtube' target='_blank'><i class='fab fa-youtube fa-3x' style='color: #FF0000; margin: 8px; background-color: white;'></i></a>";
            }
            echo "</div>";
        }
    }
}