function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
import React, { useState } from 'react';
import ProgressIndicator from '.';
import { Button, Card, Flexbox, Icon, Media } from '../..';
var meta = {
  component: ProgressIndicator,
  title: 'Molecules / ProgressIndicator'
};
export default meta;
export var Default = function Default() {
  var _useState = useState(2),
    _useState2 = _slicedToArray(_useState, 2),
    currentStep = _useState2[0],
    setCurrentStep = _useState2[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    infoCallback: function infoCallback() {
      return alert('info callback');
    },
    closeCallback: function closeCallback() {
      return alert('close callback');
    },
    backCallback: function backCallback() {
      return alert('back callback');
    },
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var NoHelpButton = function NoHelpButton() {
  var _useState3 = useState(2),
    _useState4 = _slicedToArray(_useState3, 2),
    currentStep = _useState4[0],
    setCurrentStep = _useState4[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    closeCallback: function closeCallback() {
      return alert('close callback');
    },
    backCallback: function backCallback() {
      return alert('back callback');
    },
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var NoCloseButton = function NoCloseButton() {
  var _useState5 = useState(2),
    _useState6 = _slicedToArray(_useState5, 2),
    currentStep = _useState6[0],
    setCurrentStep = _useState6[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    backCallback: function backCallback() {
      return alert('back callback');
    },
    infoCallback: function infoCallback() {
      return alert('info callback');
    },
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var NoBackButton = function NoBackButton() {
  var _useState7 = useState(2),
    _useState8 = _slicedToArray(_useState7, 2),
    currentStep = _useState8[0],
    setCurrentStep = _useState8[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    numberOfSteps: 3,
    currentStep: currentStep,
    closeCallback: function closeCallback() {
      return alert('close callback');
    },
    infoCallback: function infoCallback() {
      return alert('info callback');
    }
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var NoBackNoHelpButton = function NoBackNoHelpButton() {
  var _useState9 = useState(2),
    _useState10 = _slicedToArray(_useState9, 2),
    currentStep = _useState10[0],
    setCurrentStep = _useState10[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    numberOfSteps: 3,
    currentStep: currentStep,
    closeCallback: function closeCallback() {
      return alert('close callback');
    }
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var NoButtons = function NoButtons() {
  var _useState11 = useState(2),
    _useState12 = _slicedToArray(_useState11, 2),
    currentStep = _useState12[0],
    setCurrentStep = _useState12[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var NoTitle = function NoTitle() {
  var _useState13 = useState(2),
    _useState14 = _slicedToArray(_useState13, 2),
    currentStep = _useState14[0],
    setCurrentStep = _useState14[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    numberOfSteps: 3,
    currentStep: currentStep
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var WithButtonInfoAndExitCallback = function WithButtonInfoAndExitCallback() {
  var _useState15 = useState(2),
    _useState16 = _slicedToArray(_useState15, 2),
    currentStep = _useState16[0],
    setCurrentStep = _useState16[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    buttonCallback: true,
    title: "Very long Progress flow title text Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer condimentum ipsum eget neque venenatis",
    numberOfSteps: 3,
    currentStep: currentStep,
    infoCallback: function infoCallback() {
      return alert('info callback');
    },
    closeCallback: function closeCallback() {
      return alert('close callback');
    },
    exitText: "Save & exit text",
    infoText: "info button text",
    infoIcon: "help"
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var WithButtonCallbackNoInfo = function WithButtonCallbackNoInfo() {
  var _useState17 = useState(2),
    _useState18 = _slicedToArray(_useState17, 2),
    currentStep = _useState18[0],
    setCurrentStep = _useState18[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    buttonCallback: true,
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep,
    closeCallback: function closeCallback() {
      return alert('close callback');
    },
    exitText: "Exit"
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var WithButtonInfoNoCallbackNoBackCallback = function WithButtonInfoNoCallbackNoBackCallback() {
  var _useState19 = useState(2),
    _useState20 = _slicedToArray(_useState19, 2),
    currentStep = _useState20[0],
    setCurrentStep = _useState20[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    infoCallback: function infoCallback() {
      return alert('info callback');
    },
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep
  }), React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3")));
};
export var WithCustomInfoCallbackElement = function WithCustomInfoCallbackElement() {
  var _useState21 = useState(2),
    _useState22 = _slicedToArray(_useState21, 2),
    currentStep = _useState22[0],
    setCurrentStep = _useState22[1];
  return React.createElement(React.Fragment, null, React.createElement(ProgressIndicator, {
    buttonCallback: true,
    infoCallback: React.createElement(React.Fragment, null, React.createElement(Media, {
      query: function query(t) {
        return t.media.lessThan(t.breakpoints.sm);
      }
    }, React.createElement(Button.Icon, {
      onClick: function onClick() {
        return alert('info custom button');
      }
    }, React.createElement(Icon.More16, {
      color: "currentColor"
    }))), React.createElement(Media, {
      query: function query(t) {
        return t.media.greaterThan(t.breakpoints.sm);
      }
    }, React.createElement(Button.Pill, {
      onClick: function onClick() {
        return alert('info custom button');
      }
    }, "custom read more button"))),
    title: "Progress flow title",
    numberOfSteps: 3,
    currentStep: currentStep,
    closeCallback: function closeCallback() {
      return alert('close callback');
    },
    exitText: "Exit"
  }), React.createElement(Card, null, React.createElement(Flexbox, {
    container: true,
    justifyContent: "space-around"
  }, React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(1);
    }
  }, "1"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(2);
    }
  }, "2"), React.createElement(Button, {
    onClick: function onClick() {
      return setCurrentStep(3);
    }
  }, "3"))));
};