import React from 'react';
import { Form } from 'react-bootstrap';
import translateLabel from "../../translation";

const CheckBox = ({
  name,
  id,
  value,
  label,
  type,
  isValid,
  options,
  onChange
}) => /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form.Group, {
  controlId: id
}, /*#__PURE__*/React.createElement(Form.Label, null, label), options.map((data, index) => /*#__PURE__*/React.createElement("div", {
  key: `custom-inline-${data.text}`,
  className: "mb-3"
}, /*#__PURE__*/React.createElement(Form.Check, {
  type: type,
  name: name,
  label: translateLabel(data.text),
  value: data.value,
  checked: data.checked,
  id: id + index + 1,
  isValid: isValid,
  onChange: onChange
})))));

export default CheckBox;