// Libs
// -----------------------------------------------------------------------------
import { FC } from 'react';
import { observer } from 'mobx-react-lite';
import { Typography, Row, Col } from 'antd';

// App
// -----------------------------------------------------------------------------
import { useStore } from 'stores/StoreProvider';
import { RootStore } from 'stores/RootStore';
import styles from './Footer.module.scss';

const Footer: FC = observer(() => {
  const rootStore: RootStore = useStore();
  const { version, product } = rootStore.systemInfoStore;

  return (
    <Row className={styles['footer']}>
      <Col flex="auto">
        {product?.trim()}, v{version?.trim()}
      </Col>
      <Col flex="none">
        © 2022{' '}
        <Typography.Link href="https://www.infowatch.ru/">
          InfoWatch
        </Typography.Link>
      </Col>
    </Row>
  );
});

export default Footer;
