"use strict";

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

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

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

var _default = {
  title: 'Typography/List',
  parameters: {
    docs: {
      source: {
        type: 'dynamic'
      }
    }
  }
};
exports.default = _default;

var listMarkup = function listMarkup(type) {
  var label = type.charAt(0).toUpperCase() + type.slice(1);
  var className = 'ds-c-list';
  var Tag = 'ul';
  if (type === 'unstyled') className = 'ds-c-list ds-c-list--bare';
  if (type === 'ordered') Tag = 'ol';
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("h2", {
    className: "ds-h6",
    id: "".concat(type, "-list-id")
  }, label, " list title"), /*#__PURE__*/_react.default.createElement(Tag, {
    className: className,
    "aria-labelledby": "".concat(type, "-list-id")
  }, /*#__PURE__*/_react.default.createElement("li", null, "List item 1"), /*#__PURE__*/_react.default.createElement("li", null, "List item 2")));
};

var unorderedList = function unorderedList() {
  return listMarkup('unordered');
};

exports.unorderedList = unorderedList;

var orderedList = function orderedList() {
  return listMarkup('ordered');
};

exports.orderedList = orderedList;

var unstyledList = function unstyledList() {
  return listMarkup('unstyled');
};

exports.unstyledList = unstyledList;