import { Collapse, Form, Switch } from "antd";
import React from "react";
import { useTranslation } from "react-i18next";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectJobReadOnly } from "../../redux/application/application.selectors";
import LayoutFormRow from "../layout-form-row/layout-form-row.component";

const mapStateToProps = createStructuredSelector({
  jobRO: selectJobReadOnly
});

export function JobsDetailRatesOther({ jobRO, expanded, required = true, form }) {
  const { t } = useTranslation();

  return (
    <Collapse defaultActiveKey={expanded && "rates"}>
      <Collapse.Panel forceRender header={t("jobs.labels.cieca_pfo")} key="cieca_pfo">
        <LayoutFormRow noDivider>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.tow_t_in1")}
            name={["cieca_pfo", "tow_t_in1"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.tow_t_in2")}
            name={["cieca_pfo", "tow_t_in2"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.tow_t_in3")}
            name={["cieca_pfo", "tow_t_in3"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.tow_t_in4")}
            name={["cieca_pfo", "tow_t_in4"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.tow_t_in5")}
            name={["cieca_pfo", "tow_t_in5"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>

          <Form.Item
            label={t("jobs.fields.cieca_pfo.stor_t_in1")}
            name={["cieca_pfo", "stor_t_in1"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.stor_t_in2")}
            name={["cieca_pfo", "stor_t_in2"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.stor_t_in3")}
            name={["cieca_pfo", "stor_t_in3"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.stor_t_in4")}
            name={["cieca_pfo", "stor_t_in4"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
          <Form.Item
            label={t("jobs.fields.cieca_pfo.stor_t_in5")}
            name={["cieca_pfo", "stor_t_in5"]}
            valuePropName="checked"
          >
            <Switch />
          </Form.Item>
        </LayoutFormRow>
      </Collapse.Panel>
    </Collapse>
  );
}

export default connect(mapStateToProps, null)(JobsDetailRatesOther);
