"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.WithLabels = exports.WarningStep = exports.StepProgression = exports.LotsOfSteps = exports.FailureStep = exports.DefaultStory = exports.CustomTitles = exports.CustomColors = void 0;
var _react = _interopRequireDefault(require("react"));
var _ = _interopRequireDefault(require("."));
var _2 = require("../..");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
var meta = {
  component: _.default,
  title: 'Molecules / ProgressBar'
};
var _default = exports.default = meta;
var DefaultStory = exports.DefaultStory = {
  args: {
    currentStep: 2,
    numberOfSteps: 3,
    stepLabels: []
  },
  name: 'Default'
};
var WithLabels = exports.WithLabels = {
  args: _objectSpread(_objectSpread({}, DefaultStory.args), {}, {
    stepLabels: ['Lorem ipsum', 'Dolor sit amet', 'Foo bar']
  })
};
var StepProgression = exports.StepProgression = function StepProgression() {
  var stepLabels = ['One', 'Two', 'Three'];
  return _react.default.createElement(_2.Box, {
    px: 10
  }, _react.default.createElement(_2.Flexbox, {
    container: true,
    direction: "column",
    gap: 2
  }, _react.default.createElement(_.default, {
    numberOfSteps: 3,
    currentStep: 1,
    stepLabels: stepLabels
  }), _react.default.createElement(_.default, {
    numberOfSteps: 3,
    currentStep: 2,
    stepLabels: stepLabels
  }), _react.default.createElement(_.default, {
    numberOfSteps: 3,
    currentStep: 3,
    stepLabels: stepLabels
  })));
};
var FailureStep = exports.FailureStep = function FailureStep() {
  var stepLabels = ['One', 'Two', 'Failed step', 'Four'];
  return _react.default.createElement(_2.Box, {
    px: 10
  }, _react.default.createElement(_2.Flexbox, {
    container: true,
    direction: "column",
    gap: 2
  }, _react.default.createElement(_.default, {
    numberOfSteps: 4,
    currentStep: 3,
    stepLabels: stepLabels,
    failed: true
  })));
};
var WarningStep = exports.WarningStep = function WarningStep() {
  var stepLabels = ['One', 'Two', 'Step with warning', 'Four'];
  return _react.default.createElement(_2.Box, {
    px: 10
  }, _react.default.createElement(_2.Flexbox, {
    container: true,
    direction: "column",
    gap: 2
  }, _react.default.createElement(_.default, {
    numberOfSteps: 4,
    currentStep: 3,
    stepLabels: stepLabels,
    warning: true
  })));
};
var LotsOfSteps = exports.LotsOfSteps = function LotsOfSteps() {
  var stepLabels = ['Lorem', 'Ipsum', 'Dolor', 'Sit', 'Amet', 'Ego', 'Sum'];
  return _react.default.createElement(_2.Box, {
    px: 10
  }, _react.default.createElement(_.default, {
    numberOfSteps: 7,
    currentStep: 4,
    stepLabels: stepLabels
  }));
};
var CustomColors = exports.CustomColors = function CustomColors() {
  var stepLabels = ['Done', 'Active', 'Next'];
  return _react.default.createElement(_2.Box, {
    px: 10
  }, _react.default.createElement(_.default, {
    numberOfSteps: 3,
    currentStep: 2,
    stepLabels: stepLabels,
    colorDone: function colorDone(t) {
      return t.color.menuAccent4;
    },
    colorActive: function colorActive(t) {
      return t.color.menuAccent1;
    },
    colorNext: function colorNext(t) {
      return t.color.menuAccent2;
    },
    colorText: function colorText(t) {
      return t.color.menuAccent5;
    },
    colorLabel: function colorLabel(t) {
      return t.color.cta;
    }
  }));
};
var CustomTitles = exports.CustomTitles = function CustomTitles() {
  var stepLabels = ['Huey', 'Dewey', 'Louie'];
  return _react.default.createElement(_2.Box, {
    px: 10
  }, _react.default.createElement(_.default, {
    numberOfSteps: 3,
    currentStep: 2,
    stepLabels: stepLabels,
    titleContainer: "Donald's Nephews",
    titleDone: "The red one",
    titleActive: "The blue one",
    titleNext: "The green one"
  }));
};