"use strict";

var _react = _interopRequireDefault(require("react"));
var _react2 = require("@storybook/react");
var _storybookState = require("@sambego/storybook-state");
var _index = _interopRequireDefault(require("./index"));
var _ConfigurationModeSwitch = _interopRequireDefault(require("../../../Screens/Configurator/Components/ConfigurationModeSwitch"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
var mockedPriceData = [{
  key: 'Damen Polo Organic, JAMES & NICHOLSON',
  identifier: 'precosts',
  label: 'Damen Polo Organic, JAMES & NICHOLSON',
  selectable: false,
  price: '98,00 €'
}, {
  key: 'Vorkosten',
  identifier: 'precosts',
  label: 'Vorkosten',
  selectable: false,
  price: '29,00 €'
}, {
  key: 'Werbedruck',
  identifier: 'advertisePrinting',
  label: 'Werbedruck',
  selectable: false,
  price: '42,00 €'
}, {
  key: 'Logokosten',
  identifier: 'logisticsCosts',
  label: 'Logokosten',
  selectable: false,
  price: '0,00 €'
}, {
  key: 'Korrekturanzug',
  identifier: 'proof',
  label: 'Korrekturabzug',
  selectable: true,
  price: '0,00 €'
}, {
  key: 'Korrekturmuster',
  identifier: 'correctionDraft',
  label: 'Korrekturmuster',
  selectable: true,
  price: '0,00 €'
}];
var store = new _storybookState.Store({
  amount: 100
});
function handleChange(event) {
  store.set({
    amount: +event.target.value
  });
}
(0, _react2.storiesOf)('AmountPrice', module).add('boxed', function () {
  return /*#__PURE__*/_react["default"].createElement(_storybookState.State, {
    store: store
  }, function (state) {
    return /*#__PURE__*/_react["default"].createElement(_index["default"], {
      amount: state.amount,
      boxed: true,
      priceFormatted: "500,00 \u20AC",
      vatNotice: "VAT included plus shipping",
      priceList: mockedPriceData,
      onChangeAmount: handleChange
    });
  });
}).add('not boxed', function () {
  return /*#__PURE__*/_react["default"].createElement(_storybookState.State, {
    store: store
  }, function (state) {
    return /*#__PURE__*/_react["default"].createElement(_index["default"], {
      amount: state.amount,
      boxed: false,
      priceFormatted: "500,00 \u20AC",
      vatNotice: "VAT included plus shipping",
      priceList: mockedPriceData,
      onChangeAmount: handleChange
    });
  });
}).add('with configuration mode switch', function () {
  return /*#__PURE__*/_react["default"].createElement(_storybookState.State, {
    store: store
  }, function (state) {
    return /*#__PURE__*/_react["default"].createElement(_index["default"], {
      amount: state.amount,
      boxed: true,
      priceFormatted: "500,00 \u20AC",
      vatNotice: "VAT included plus shipping",
      priceList: mockedPriceData,
      onChangeAmount: handleChange,
      showConfigurationModeSwitch: true,
      ConfigurationModeSwitchComponent: function ConfigurationModeSwitchComponent(props) {
        return /*#__PURE__*/_react["default"].createElement(_ConfigurationModeSwitch["default"], _extends({
          onChange: function onChange(mode) {
            return alert(mode);
          },
          configurationModeOptions: ['designer']
        }, props));
      }
    });
  });
});