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); }
import React from 'react';
import ProgressBar from '.';
import { Box, Flexbox } from '../..';
var meta = {
  component: ProgressBar,
  title: 'Molecules / ProgressBar'
};
export default meta;
export var DefaultStory = {
  args: {
    currentStep: 2,
    numberOfSteps: 3,
    stepLabels: []
  },
  name: 'Default'
};
export var WithLabels = {
  args: _objectSpread(_objectSpread({}, DefaultStory.args), {}, {
    stepLabels: ['Lorem ipsum', 'Dolor sit amet', 'Foo bar']
  })
};
export var StepProgression = function StepProgression() {
  var stepLabels = ['One', 'Two', 'Three'];
  return React.createElement(Box, {
    px: 10
  }, React.createElement(Flexbox, {
    container: true,
    direction: "column",
    gap: 2
  }, React.createElement(ProgressBar, {
    numberOfSteps: 3,
    currentStep: 1,
    stepLabels: stepLabels
  }), React.createElement(ProgressBar, {
    numberOfSteps: 3,
    currentStep: 2,
    stepLabels: stepLabels
  }), React.createElement(ProgressBar, {
    numberOfSteps: 3,
    currentStep: 3,
    stepLabels: stepLabels
  })));
};
export var FailureStep = function FailureStep() {
  var stepLabels = ['One', 'Two', 'Failed step', 'Four'];
  return React.createElement(Box, {
    px: 10
  }, React.createElement(Flexbox, {
    container: true,
    direction: "column",
    gap: 2
  }, React.createElement(ProgressBar, {
    numberOfSteps: 4,
    currentStep: 3,
    stepLabels: stepLabels,
    failed: true
  })));
};
export var WarningStep = function WarningStep() {
  var stepLabels = ['One', 'Two', 'Step with warning', 'Four'];
  return React.createElement(Box, {
    px: 10
  }, React.createElement(Flexbox, {
    container: true,
    direction: "column",
    gap: 2
  }, React.createElement(ProgressBar, {
    numberOfSteps: 4,
    currentStep: 3,
    stepLabels: stepLabels,
    warning: true
  })));
};
export var LotsOfSteps = function LotsOfSteps() {
  var stepLabels = ['Lorem', 'Ipsum', 'Dolor', 'Sit', 'Amet', 'Ego', 'Sum'];
  return React.createElement(Box, {
    px: 10
  }, React.createElement(ProgressBar, {
    numberOfSteps: 7,
    currentStep: 4,
    stepLabels: stepLabels
  }));
};
export var CustomColors = function CustomColors() {
  var stepLabels = ['Done', 'Active', 'Next'];
  return React.createElement(Box, {
    px: 10
  }, React.createElement(ProgressBar, {
    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;
    }
  }));
};
export var CustomTitles = function CustomTitles() {
  var stepLabels = ['Huey', 'Dewey', 'Louie'];
  return React.createElement(Box, {
    px: 10
  }, React.createElement(ProgressBar, {
    numberOfSteps: 3,
    currentStep: 2,
    stepLabels: stepLabels,
    titleContainer: "Donald's Nephews",
    titleDone: "The red one",
    titleActive: "The blue one",
    titleNext: "The green one"
  }));
};