import React, { Component } from 'react';

import constants from 'cem/constants/properties';
const { options } = constants;

import styles from 'cem/styles/id/main';
import UI from 'cem/components/ui';
const {
  Form, Grid, Checklist,
} = UI;

export default class extends Component {
  render() {
    const { fields } = this.props;
    return (
      <section className={this.props.className}>
        <Grid.Row>
          <Grid.Col xs="20">
            <h2 className={styles.title}>Оснащение квартиры</h2>
          </Grid.Col>
        </Grid.Row>

        <Grid.Row>
          {options.equipment.map((item, index) => (
            <Grid.Col sm="6" key={index}>
              <Form.Label>
                <Checklist {...fields.equipment} option={item} checkbox={<Form.Input type="checkbox" />} /> {item.title}
              </Form.Label>
            </Grid.Col>
          ))}
        </Grid.Row>
      </section>
    );
  }
}
