"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.vertical = exports.withCheckbox = exports.Regular = exports.default = void 0;

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _react = _interopRequireDefault(require("react"));

var _ = _interopRequireDefault(require("."));

var _README = _interopRequireDefault(require("./README.mdx"));

var _RadioButton = _interopRequireDefault(require("../RadioButton"));

var _Checkbox = _interopRequireDefault(require("../Checkbox"));

var _default = {
  title: 'Components/Forms/InputGroup',
  component: _.default,
  parameters: {
    componentSubtitle: 'Component',
    mdx: _README.default
  }
};
exports.default = _default;

var Regular = function Regular(args) {
  return /*#__PURE__*/_react.default.createElement(_.default, (0, _extends2.default)({
    defaultSelected: "default-selected",
    labelText: "Group labelText",
    helperText: "Helper text"
  }, args), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
    name: "radio",
    value: "standard",
    id: "radio-1",
    labelText: "Radio button label 1"
  }), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
    name: "radio",
    value: "default-selected",
    id: "radio-2",
    labelText: "Radio button label 2"
  }), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
    name: "radio",
    value: "disabled",
    id: "radio-3",
    labelText: "Radio 1"
  }));
};

exports.Regular = Regular;

var withCheckbox = function withCheckbox(args) {
  return /*#__PURE__*/_react.default.createElement(_.default, (0, _extends2.default)({
    defaultSelected: "default-selected",
    labelText: "Group labelText",
    helperText: "Helper text"
  }, args), /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
    name: "checkbox-1",
    value: "standard",
    labelText: "Checkbox label 1"
  }), /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
    name: "checkbox-2",
    value: "default-selected",
    labelText: "Checkbox label 2"
  }), /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
    name: "checkbox-3",
    value: "disabled",
    labelText: "Checkbox label 3"
  }));
};

exports.withCheckbox = withCheckbox;
withCheckbox.story = {
  parameters: {
    docs: {
      storyDescription: 'The InputGroup can be used with checkboxes'
    }
  }
};

var vertical = function vertical(args) {
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_.default, (0, _extends2.default)({
    defaultSelected: "default-selected",
    labelText: "Group labelText",
    helperText: "Helper text",
    vertical: true
  }, args), /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
    name: "checkboxb-1",
    value: "standard",
    labelText: "Checkbox label 1"
  }), /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
    name: "checkboxb-2",
    value: "default-selected",
    labelText: "Checkbox label 2"
  }), /*#__PURE__*/_react.default.createElement(_Checkbox.default, {
    name: "checkboxb-3",
    value: "disabled",
    labelText: "Checkbox label 3"
  })), /*#__PURE__*/_react.default.createElement(_.default, (0, _extends2.default)({
    defaultSelected: "default-selected",
    legend: "Group Legend",
    vertical: true
  }, args), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
    name: "radiob",
    value: "standard",
    id: "radiob-1",
    labelText: "Radio button label 1"
  }), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
    name: "radiob",
    value: "default-selected",
    id: "radiob-2",
    labelText: "Radio button label 2"
  }), /*#__PURE__*/_react.default.createElement(_RadioButton.default, {
    name: "radiob",
    value: "disabled",
    id: "radiob-3",
    labelText: "Radio 1"
  })));
};

exports.vertical = vertical;
vertical.story = {
  parameters: {
    docs: {
      storyDescription: 'Use the vertical alignment if the elements do not have enough horizontal space. Avoid wrapping InputGroupss'
    }
  }
};