import React from "react";
import Link from "next/link";
import { FaFacebookF, FaGithub, FaTwitter } from "react-icons/fa";
import { AiFillInstagram } from "react-icons/ai";
import { Container } from "../../util/container";
import { RawRenderer } from "./rawRenderer";
import { ObjectField } from "@tinacms/schema-tools/dist/types";
import TagManager from "react-gtm-module";

export const Footer = ({ data, rawData }) => {
    return (
        <footer className={ "" }>
            <Container className="relative" size="small">
                <div>
                    <p>Contact :<br/><a href="mailto:psychartherapie@gmail.com" onClick={ () => { /* window.dataLayer.push({ event: "mail-click" });*/ } }>psychartherapie@gmail.com</a><br/><b>06 49 23 02 90</b></p>
                    <p>SIRET 911 883 338 00012<br/><a href="legals.html">Mentions légales</a></p>
                    <div id="socials" className="d-flex d-column">
                        <a href="https://www.facebook.com/psychartherapie.gard" onClick={ () => { /* window.dataLayer.push({ socials: "fb-click" });*/ } } className="py-2 me-2">
                            <img src="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjIiPjxwYXRoIGQ9Ik00NDkuNDQ2IDBDNDgzLjk3MSAwIDUxMiAyOC4wMyA1MTIgNjIuNTU0djM4Ni44OTJDNTEyIDQ4My45NyA0ODMuOTcgNTEyIDQ0OS40NDYgNTEySDM0Mi45NzhWMzE5LjA4NWg2Ni42bDEyLjY3Mi04Mi42MjFoLTc5LjI3MnYtNTMuNjE3YzAtMjIuNjAzIDExLjA3My00NC42MzYgNDYuNTgtNDQuNjM2SDQyNS42di03MC4zNHMtMzIuNzEtNS41ODItNjMuOTgyLTUuNTgyYy02NS4yODggMC0xMDcuOTYgMzkuNTY5LTEwNy45NiAxMTEuMjA0djYyLjk3MWgtNzIuNTczdjgyLjYyMWg3Mi41NzNWNTEySDYyLjU1NEMyOC4wMyA1MTIgMCA0ODMuOTcgMCA0NDkuNDQ2VjYyLjU1NEMwIDI4LjAzIDI4LjAyOSAwIDYyLjU1NCAwaDM4Ni44OTJaIiBmaWxsPSIjMTI0NDk4IiBjbGFzcz0iZmlsbC0wMDAwMDAiPjwvcGF0aD48L3N2Zz4=" alt="Facebook"/>
                        </a>
                        <a href="https://www.instagram.com/psychartherapie" onClick={ () => { /* window.dataLayer.push({ socials: "insta-click" });*/ } } className="py-2">
                            <img src="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgNTEyIDUxMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIGNsaXAtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCIgc3Ryb2tlLW1pdGVybGltaXQ9IjIiPjxwYXRoIGQ9Ik00NDkuNDQ2IDBDNDgzLjk3MSAwIDUxMiAyOC4wMyA1MTIgNjIuNTU0djM4Ni44OTJDNTEyIDQ4My45NyA0ODMuOTcgNTEyIDQ0OS40NDYgNTEySDYyLjU1NEMyOC4wMyA1MTIgMCA0ODMuOTcgMCA0NDkuNDQ2VjYyLjU1NEMwIDI4LjAzIDI4LjAyOSAwIDYyLjU1NCAwaDM4Ni44OTJaTTI1NiA4MWMtNDcuNTI3IDAtNTMuNDg3LjIwMS03Mi4xNTIgMS4wNTMtMTguNjI3Ljg1LTMxLjM0OCAzLjgwOC00Mi40OCA4LjEzNS0xMS41MDggNC40NzItMjEuMjY3IDEwLjQ1Ni0zMC45OTYgMjAuMTg0LTkuNzI5IDkuNzI5LTE1LjcxMyAxOS40ODktMjAuMTg1IDMwLjk5Ni00LjMyNiAxMS4xMzItNy4yODQgMjMuODUzLTguMTM1IDQyLjQ4Qzg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uODY1IDg5Ljg2NSAwIDQ5LjYzMSA0MC4yMzQgODkuODY1IDg5Ljg2NSA4OS44NjUgNDkuNjMxIDAgODkuODY1LTQwLjIzNCA4OS44NjUtODkuODY1IDAtNDkuNjMxLTQwLjIzNC04OS44NjUtODkuODY1LTg5Ljg2NVptMCAxNDguMTk4Yy0zMi4yMTcgMC01OC4zMzMtMjYuMTE2LTU4LjMzMy01OC4zMzNzMjYuMTE2LTU4LjMzMyA1OC4zMzMtNTguMzMzIDU4LjMzMyAyNi4xMTYgNTguMzMzIDU4LjMzMy0yNi4xMTYgNTguMzMzLTU4LjMzMyA1OC4zMzNabTExNC40MTYtMTUxLjc0OGMwIDExLjU5OC05LjQwMyAyMC45OTktMjEuMDAxIDIwLjk5OS0xMS41OTcgMC0yMC45OTktOS40MDEtMjAuOTk5LTIwLjk5OSAwLTExLjU5OCA5LjQwMi0yMSAyMC45OTktMjEgMTEuNTk4IDAgMjEuMDAxIDkuNDAyIDIxLjAwMSAyMVoiIGZpbGw9IiMxMjQ0OTgiIGNsYXNzPSJmaWxsLTAwMDAwMCI+PC9wYXRoPjwvc3ZnPg==" alt="Instagram"/>
                        </a>
                    </div>
                    <div>
                        <p>&copy; 2021 &#8211; Fait avec amour par <a className="mx-1" href="https://www.linkedin.com/in/nolwenn-meyer/">Nolwenn Meyer</a></p>
                    </div>
                </div>
            </Container>
        </footer>
    );
};

export const footerSchema: ObjectField = {
    type: "object",
    label: "Footer",
    name: "footer",
    fields: [
        {
            type: "object",
            label: "Social Links",
            name: "social",
            fields: [
                {
                    type: "string",
                    label: "Facebook",
                    name: "facebook"
                },
                {
                    type: "string",
                    label: "Twitter",
                    name: "twitter"
                },
                {
                    type: "string",
                    label: "Instagram",
                    name: "instagram"
                },
                {
                    type: "string",
                    label: "Github",
                    name: "github"
                }
            ]
        }]
};