import PropTypes from 'prop-types';
import React from 'react';
import { FormattedHTMLMessage } from 'react-intl';
import Col from 'react-bootstrap/lib/Col';
import Grid from 'react-bootstrap/lib/Grid';
import Row from 'react-bootstrap/lib/Row';
import { Link } from 'react-router-dom';

import FeedbackLink from 'shared/feedback-link';
import Logo from 'shared/logo';
import { injectT } from 'i18n';
import { getCurrentCustomization } from 'utils/customizationUtils';

function FooterContent({ t }) {
  const feedbackLink = <FeedbackLink>{t('Footer.feedbackLink')}</FeedbackLink>;

  switch (getCurrentCustomization()) {
    case 'ESPOO': {
      return (
        <Grid>
          <Row>
            <Col lg={3} md={3}>
              <Link className="brand-link" to="/">
                <Logo />
                Varaamo
              </Link>
            </Col>
            <Col lg={6} md={6}>
              <p>
                <FormattedHTMLMessage id="Footer.espooText" />
              </p>
              <p>
                {feedbackLink}
              </p>
            </Col>
            <Col lg={3} md={3}>
              <p className="app-varaamo-version">v0.3.0</p>
            </Col>
          </Row>
        </Grid>
      );
    }

    case 'VANTAA': {
      return (
        <Grid>
          <Row>
            <Col lg={3} md={3}>
              <Link className="brand-link" to="/">
                <Logo />
                Varaamo
              </Link>
            </Col>
            <Col lg={6} md={6}>
              <p>
                <FormattedHTMLMessage id="Footer.vantaaText" />
              </p>
              <p>
                {feedbackLink}
              </p>
            </Col>
            <Col lg={3} md={3}>
              <p className="app-varaamo-version">v0.3.0</p>
            </Col>
          </Row>
        </Grid>
      );
    }

    default: {
      return (
        <Grid>
          <Row>
            <Col lg={3} md={3}>
              <Link className="brand-link" to="/">
                <Logo />
                Varaamo
              </Link>
            </Col>
            <Col lg={6} md={6}>
              <p>
                <FormattedHTMLMessage id="Footer.helsinkiText" />
              </p>
              <p>
                {feedbackLink}
              </p>
            </Col>
            <Col lg={3} md={3}>
              <p className="app-varaamo-version">v0.3.0</p>
            </Col>
          </Row>
        </Grid>
      );
    }
  }
}

FooterContent.propTypes = {
  t: PropTypes.func.isRequired,
};

FooterContent.defaultProps = {
  onLinkClick: () => {},
};

export default injectT(FooterContent);

@@ -280,16 +280,65 @@
 -dom';%0A%0A
+import %7B version %7D from '../../../package.json';%0A
 import F
@@ -378,16 +378,16 @@
 -link';%0A
-
 import L
@@ -1194,38 +1194,47 @@
 araamo-version%22%3E
-v0.3.0
+%7B%60v$%7Bversion%7D%60%7D
 %3C/p%3E%0A           
@@ -1823,38 +1823,47 @@
 araamo-version%22%3E
-v0.3.0
+%7B%60v$%7Bversion%7D%60%7D
 %3C/p%3E%0A           
@@ -2460,14 +2460,23 @@
 on%22%3E
-v0.3.0
+%7B%60v$%7Bversion%7D%60%7D
 %3C/p%3E

Add version number display in footer from package file