import Background from 'elements/layout/Background';
import Tabs from 'elements/layout/Tabs';
import styled from 'styled-components';
import { min } from 'ui/mq';
import PaymentsTable from './PaymentsTable';
import Results from './Results';
import Validation from './Validation';

const outputTabs = [PaymentsTable, Results, Validation];

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

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

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

export default Output;
