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

const formTabs = [Leasing, Payments];

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

export default Form;
