import Background from 'Elements/layout/Background';
import Tabs from 'Elements/layout/Tabs';
import styled from 'styled-components';
import { min } from 'UIKit/mq';
import Output from './Output';
import Validation from './Validation';

const resultsTabs = [Output, Validation];

const Wrapper = styled(Background)`
  padding: 4px 10px;
  min-height: 200px;

  ${min('laptop')} {
    padding: 4px 18px;
    min-height: 600px;
  }
`;

function Results() {
  return (
    <Wrapper>
      <Tabs>
        {resultsTabs.map(({ id, title, Component }) => (
          <Tabs.TabPane tab={title} key={id}>
            <Component />
          </Tabs.TabPane>
        ))}
      </Tabs>
    </Wrapper>
  );
}

export default Results;
