import _extends from "@babel/runtime/helpers/extends";
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
import React, { useState } from 'react';
import StepNavigation from './StepNavigation';
import StepNavigationItem from '../StepNavigationItem';
import markdown from './README.mdx';
export default {
  title: 'Components/Navigations/StepNavigation',
  component: StepNavigation,
  subcomponents: {
    StepNavigationItem: StepNavigationItem
  },
  parameters: {
    componentSubtitle: 'Component',
    status: 'released',
    mdx: markdown
  }
};
export var StepNavigationRegular = function StepNavigationRegular(args) {
  var _useState = useState(0),
      _useState2 = _slicedToArray(_useState, 2),
      step = _useState2[0],
      setStep = _useState2[1];

  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepNavigation, _extends({}, args, {
    onSelectionChange: function onSelectionChange(e) {
      return setStep(e);
    },
    selectedPage: step
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Item without Status",
    helperText: "dbsajjh",
    page: 0
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Active Item",
    page: 1
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Not started Item",
    page: 2,
    status: "not-started"
  })));
};
StepNavigationRegular.args = {
  children: 'StepNavigation'
};
StepNavigationRegular.story = {
  parameters: {
    docs: {
      source: {
        code: "\n        import { StepNavigation , StepNavigationItem } from \"@wfp/ui\";\n        \nconst StepNavigationExample = (args) => {\n  const [step, setStep] = useState(0);\n  return (\n    <StepNavigation onSelectionChange={(e) => setStep(e)} selectedPage={step}>\n      <StepNavigationItem label=\"Item without Status\" page={0} />\n      <StepNavigationItem label=\"Active Item\" page={1} />\n      <StepNavigationItem label=\"Not started Item\" page={2} status=\"not-started\" />\n    </StepNavigation> \n  ) \n}\n      "
      }
    }
  }
};
export var DifferentStates = function DifferentStates(args) {
  return /*#__PURE__*/React.createElement(StepNavigation, args, /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Item without Status",
    page: 0
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Active Item",
    page: 1
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Not started Item",
    page: 2,
    status: "not-started"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Warning Item",
    page: 3,
    status: "warning"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Complete Item",
    page: 4,
    status: "complete"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Skipped Item",
    page: 4,
    status: "skip"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Disabled Item",
    page: 5,
    status: "disabled"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Locked Item",
    page: 6,
    status: "locked"
  }));
};
DifferentStates.args = {};
var description = "\n\n#### Default types of state\n\n| status   |  Description  |\n|----------|-------------|\n| `warning` | warning that there is information missing |\n| `error` | experimental   |\n| `not-started` | currently empty, because not yet started |\n| `locked` | can't be accessed at the moment |\n| `skip` | skipped step |\n| `disabled` | disabled step |\n| `complete` | completed step |\n";
DifferentStates.story = {
  parameters: {
    docs: {
      storyDescription: description
    }
  }
};
export var Vertical = function Vertical(args) {
  return /*#__PURE__*/React.createElement(StepNavigation, args, /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Item without Status",
    page: 0
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Active Item",
    page: 1
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Not started Item",
    page: 2,
    status: "not-started"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Warning Item",
    page: 3,
    status: "warning"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Complete Item",
    page: 4,
    status: "complete"
  }));
};
Vertical.args = {
  vertical: true
};
Vertical.story = {
  parameters: {
    docs: {
      storyDescription: ""
    }
  }
};
export var Small = function Small(args) {
  return /*#__PURE__*/React.createElement(StepNavigation, args, /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Item without Status",
    page: 0
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Active Item",
    page: 1
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Not started Item",
    page: 2,
    status: "not-started"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Warning Item",
    page: 3,
    status: "warning"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Complete Item",
    page: 4,
    status: "complete"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Skipped Item",
    page: 4,
    status: "skip"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Disabled Item",
    page: 5,
    status: "disabled"
  }), /*#__PURE__*/React.createElement(StepNavigationItem, {
    label: "Locked Item",
    page: 6,
    status: "locked"
  }));
};
Small.args = {
  vertical: true,
  small: true
};
Small.story = {
  parameters: {
    docs: {
      storyDescription: "The `small` StepNavigation can be used in places the space is limited and the component is not used for navigation. Use it to indicate the progress of a flow."
    }
  }
};