import React, { FunctionComponent } from "react";
import style from "./style.module.css";

declare var __BUILD__: any;

export interface FooterProps {
  class?: string
}

const Footer: FunctionComponent<FooterProps> = ({ ...props}) => {
  return (
    <div className={`container ${style.footer} ${props.class ? props.class : ''}`}>
      <div className="columns">
        <div className="column is-4 is-offset-8">
          <p className="has-text-right is-size-7">
            Propulsé par <a className="has-text-primary" href="https://forge.cadoles.com/wpetit/guesstimate">Guesstimate</a> et publié sous licence <a className="has-text-primary" href="https://www.gnu.org/licenses/agpl-3.0.txt">AGPL-3.0</a>.
          </p>
          <p className="has-text-right is-size-7">
            Version: {__BUILD__.version} - 
            Réf.: {__BUILD__.gitRef ? __BUILD__.gitRef : '??'} - 
            Date de construction: {__BUILD__.buildDate ? __BUILD__.buildDate : '??'}
          </p>
        </div>
      </div>
    </div>
  );
};

export default Footer;
