"use strict";

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

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

var _index = require("../index");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }

function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }

function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

var ModifiersDataList =
/*#__PURE__*/
function (_React$Component) {
  _inherits(ModifiersDataList, _React$Component);

  function ModifiersDataList() {
    var _getPrototypeOf2;

    var _this;

    _classCallCheck(this, ModifiersDataList);

    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(ModifiersDataList)).call.apply(_getPrototypeOf2, [this].concat(args)));

    _defineProperty(_assertThisInitialized(_assertThisInitialized(_this)), "state", {
      show: true
    });

    return _this;
  }

  _createClass(ModifiersDataList, [{
    key: "render",
    value: function render() {
      var _this2 = this;

      var previewPlaceholder = {
        display: 'block',
        width: '100%',
        padding: '.25rem .5rem',
        color: '#004e8a',
        backgroundColor: '#def3ff',
        border: '1px solid rgba(0,0,0,.1)',
        borderRadius: '4px'
      };
      return [_react.default.createElement("div", {
        key: "example-1"
      }, _react.default.createElement("h2", null, "Default fitting - example 1"), _react.default.createElement(_index.DataList, {
        "aria-label": "Width modifier data list example 1"
      }, _react.default.createElement(_index.DataListItem, {
        "aria-labelledby": "width-ex1-item1"
      }, _react.default.createElement(_index.DataListCheck, {
        "aria-labelledby": "width-ex1-check1",
        name: "width-ex1-item1"
      }), _react.default.createElement(_index.DataListCell, null, _react.default.createElement("div", {
        style: previewPlaceholder
      }, _react.default.createElement("b", {
        id: "width-ex1-item1"
      }, "default"), _react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit."))), _react.default.createElement(_index.DataListCell, null, _react.default.createElement("div", {
        style: previewPlaceholder
      }, _react.default.createElement("b", null, "default"), _react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")))))), _react.default.createElement("div", {
        key: "example-2"
      }, _react.default.createElement("h2", null, "Flex modifiers - example 2"), _react.default.createElement(_index.DataList, {
        "aria-label": "Width modifier data list example 2"
      }, _react.default.createElement(_index.DataListItem, {
        "aria-labelledby": "width-ex2-item1"
      }, _react.default.createElement(_index.DataListCheck, {
        "aria-labelledby": "width-ex2-check1",
        name: "width-ex2-check1"
      }), _react.default.createElement(_index.DataListCell, {
        width: 2
      }, _react.default.createElement("div", {
        style: previewPlaceholder
      }, _react.default.createElement("b", {
        id: "width-ex2-item1"
      }, "width 2"), _react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt."))), _react.default.createElement(_index.DataListCell, {
        width: 4
      }, _react.default.createElement("div", {
        style: previewPlaceholder
      }, _react.default.createElement("b", null, "width 4"), _react.default.createElement("p", null, "Lorem ipsum dolor sit amet."))), _react.default.createElement(_index.DataListAction, {
        "aria-labelledby": "width-ex2-item1 width-ex2-action1",
        id: "width-ex2-action1",
        "aria-label": "Actions"
      })))), _react.default.createElement("div", {
        key: "example-3"
      }, _react.default.createElement("h2", null, "Flex modifiers - example 3"), _react.default.createElement(_index.DataList, {
        "aria-label": "Width modifier data list example 3"
      }, _react.default.createElement(_index.DataListItem, {
        "aria-labelledby": "width-ex3-item1",
        isExpanded: this.state.show
      }, _react.default.createElement(_index.DataListToggle, {
        isExpanded: this.state.show,
        id: "width-ex3-toggle1",
        "aria-labelledby": "width-ex3-toggle1 width-ex3-item1",
        "aria-label": "Toggle details for",
        onClick: function onClick() {
          return _this2.setState({
            show: !_this2.state.show
          });
        }
      }), _react.default.createElement(_index.DataListCheck, {
        "aria-labelledby": "width-ex3-check1",
        name: "width-ex3-check1"
      }), _react.default.createElement(_index.DataListCell, {
        width: 5
      }, _react.default.createElement("div", {
        style: previewPlaceholder
      }, _react.default.createElement("b", {
        id: "width-ex3-item1"
      }, "width 5"), _react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit."))), _react.default.createElement(_index.DataListCell, {
        width: 2
      }, _react.default.createElement("div", {
        style: previewPlaceholder
      }, _react.default.createElement("b", null, "width 2"), _react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit."))), _react.default.createElement(_index.DataListCell, null, _react.default.createElement("div", {
        style: previewPlaceholder
      }, "default")), _react.default.createElement(_index.DataListAction, {
        "aria-labelledby": "width-ex3-item1 width-ex3-action1",
        id: "width-ex3-action1",
        "aria-label": "Actions"
      }), _react.default.createElement(_index.DataListContent, {
        "aria-label": "Primary Content Details",
        isHidden: !this.state.show
      }, _react.default.createElement("p", null, "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.")))))];
    }
  }]);

  return ModifiersDataList;
}(_react.default.Component);

var _default = ModifiersDataList;
exports.default = _default;