import Background from 'Elements/layout/Background';
import { Tabs, Wrapper } from 'Elements/layout/Tabs';
import Leasing from './Leasing';
import LeasingObject from './LeasingObject';
import Payments from './Payments';
import SupplierAgent from './SupplierAgent';

const formTabs = [Leasing, Payments, LeasingObject, SupplierAgent];

function Form() {
  return (
    <Wrapper>
      <Tabs type="card" tabBarGutter="5px">
        {formTabs.map(({ id, title, Component }) => (
          <Tabs.TabPane tab={title} key={id}>
            <Background>
              <Component />
            </Background>
          </Tabs.TabPane>
        ))}
      </Tabs>
    </Wrapper>
  );
}

export default Form;
