"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.WithTitle = exports.WithFooter = exports.WithCustomTitle = exports.WithActionsColumn = exports.Default = void 0;
var _react = _interopRequireDefault(require("react"));
var _ = require("../../..");
var _constants = require("../shared/constants");
var _FlexTable = _interopRequireDefault(require("../FlexTable.mdx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
var _default = exports.default = {
  title: 'Molecules / FlexTable / With different table props',
  parameters: {
    component: _.FlexTable,
    docs: {
      page: _FlexTable.default
    }
  }
};
var Default = exports.Default = function Default() {
  return _react.default.createElement(_.FlexTable, null, _react.default.createElement(_.FlexTable.HeaderRow, null, _react.default.createElement(_.FlexTable.Header, {
    columnId: "column1"
  }, "Header 1"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column2"
  }, "Header 2"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column3"
  }, "Header 3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 1-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 1-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 1-3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 2-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 2-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 2-3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 3-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 3-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 3-3")));
};
var WithTitle = exports.WithTitle = function WithTitle() {
  return _react.default.createElement(_.FlexTable, {
    id: "table-with-title",
    title: "A Title"
  }, _react.default.createElement(_.FlexTable.HeaderRow, null, _react.default.createElement(_.FlexTable.Header, {
    columnId: "column1"
  }, "Header 1"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column2"
  }, "Header 2"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column3"
  }, "Header 3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 1-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 1-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 1-3")));
};
var CustomTitle = function CustomTitle(_ref) {
  var country = _ref.country,
    name = _ref.name,
    shortName = _ref.shortName;
  return _react.default.createElement(_.Flexbox, {
    container: true,
    alignItems: "baseline",
    gap: 1
  }, _react.default.createElement(_.Flexbox, {
    item: true
  }, _react.default.createElement(_.Flag, {
    country: country,
    size: "s"
  })), _react.default.createElement(_.Flexbox, {
    item: true
  }, _react.default.createElement(_.Typography, {
    type: "secondary",
    weight: "bold"
  }, name)), _react.default.createElement(_.Flexbox, {
    item: true
  }, _react.default.createElement(_.Typography, {
    type: "secondary",
    color: function color(t) {
      return t.color.label;
    }
  }, "(", shortName, ")")));
};
var WithCustomTitle = exports.WithCustomTitle = function WithCustomTitle() {
  return _react.default.createElement(_.FlexTable, {
    id: "custom-title",
    title: _react.default.createElement(CustomTitle, {
      country: "SE",
      name: "Ericsson Corporation",
      shortName: "ERICSSON"
    })
  }, _react.default.createElement(_.FlexTable.HeaderRow, null, _react.default.createElement(_.FlexTable.Header, {
    columnId: "column1"
  }, "Header 1"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column2"
  }, "Header 2"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column3"
  }, "Header 3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 1-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 1-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 1-3")));
};
var WithFooter = exports.WithFooter = function WithFooter() {
  return _react.default.createElement(_.FlexTable, null, _react.default.createElement(_.FlexTable.HeaderRow, null, _react.default.createElement(_.FlexTable.Header, {
    columnId: "column1"
  }, "Header 1"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column2"
  }, "Header 2"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column3"
  }, "Header 3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 1-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 1-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 1-3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 2-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 2-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 2-3")), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 3-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 3-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 3-3")), _react.default.createElement(_.FlexTable.FooterRow, null, _react.default.createElement(_.FlexTable.Footer, {
    columnId: "column1"
  }, "Footer 1"), _react.default.createElement(_.FlexTable.Footer, {
    columnId: "column2"
  }, "Footer 2"), _react.default.createElement(_.FlexTable.Footer, {
    columnId: "column3"
  }, "Footer 3")));
};
var WithActionsColumn = exports.WithActionsColumn = function WithActionsColumn() {
  return _react.default.createElement(_.FlexTable, null, _react.default.createElement(_.FlexTable.HeaderRow, null, _react.default.createElement(_.FlexTable.Header, {
    columnId: "column1"
  }, "Header 1"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column2"
  }, "Header 2"), _react.default.createElement(_.FlexTable.Header, {
    columnId: "column3"
  }, "Header 3"), _react.default.createElement(_.FlexTable.Header, _extends({
    columnId: "actionsColumn"
  }, _constants.ICON_COLUMN_DEFAULT_FLEX_PROPS))), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 1-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 1-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 1-3"), _react.default.createElement(_.FlexTable.Cell, _extends({
    columnId: "actionsColumn"
  }, _constants.ICON_COLUMN_DEFAULT_FLEX_PROPS), _react.default.createElement(_.Button, {
    variant: "neutral"
  }, _react.default.createElement(_.OldIcon.ThreeDots, null)))), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 2-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 2-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 2-3"), _react.default.createElement(_.FlexTable.Cell, _extends({
    columnId: "actionsColumn"
  }, _constants.ICON_COLUMN_DEFAULT_FLEX_PROPS), _react.default.createElement(_.Button, {
    variant: "neutral"
  }, _react.default.createElement(_.OldIcon.ThreeDots, null)))), _react.default.createElement(_.FlexTable.Row, null, _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column1"
  }, "Cell 3-1"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column2"
  }, "Cell 3-2"), _react.default.createElement(_.FlexTable.Cell, {
    columnId: "column3"
  }, "Cell 3-3"), _react.default.createElement(_.FlexTable.Cell, _extends({
    columnId: "actionsColumn"
  }, _constants.ICON_COLUMN_DEFAULT_FLEX_PROPS), _react.default.createElement(_.Button, {
    variant: "neutral"
  }, _react.default.createElement(_.OldIcon.ThreeDots, null)))));
};