"use strict";

var _react = _interopRequireDefault(require("react"));
var _react2 = require("@storybook/react");
var _index = _interopRequireDefault(require("./index"));
var _storybookState = require("@sambego/storybook-state");
var _i18n = require("../../../../Framework/i18n");
var _PriceList = _interopRequireDefault(require("../PriceList"));
var _AddToBasket = _interopRequireDefault(require("../AddToBasket"));
var _ProductVariant = _interopRequireDefault(require("../ProductVariant"));
var _AmountPrice = _interopRequireDefault(require("../AmountPrice"));
var _ReceiveOfferForm = _interopRequireDefault(require("../ReceiveOfferForm"));
var _Grid = _interopRequireDefault(require("@material-ui/core/Grid"));
var _blau = _interopRequireDefault(require("../ProductVariant/res/blau.jpg"));
var _grau = _interopRequireDefault(require("../ProductVariant/res/grau.jpg"));
var _rot = _interopRequireDefault(require("../ProductVariant/res/rot.jpg"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
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 amountData = [{
  url: _blau["default"],
  title: (0, _i18n.t)('mockedData.blue'),
  isSizeButtonClosed: false,
  sizes: [{
    size: 'S',
    amount: 100,
    label: 'S',
    key: 'S'
  }, {
    size: 'M',
    amount: '',
    label: 'M',
    key: 'M'
  }, {
    size: 'L',
    amount: '',
    label: 'L',
    key: 'L'
  }, {
    size: 'XL',
    amount: '',
    label: 'XL',
    key: 'XL'
  }, {
    size: 'XXL',
    amount: '',
    label: 'XXL',
    key: 'XXL'
  }]
}, {
  url: _grau["default"],
  title: (0, _i18n.t)('mockedData.gray'),
  isSizeButtonClosed: false,
  sizes: [{
    size: 'S',
    amount: 100,
    label: 'S',
    key: 'S'
  }, {
    size: 'M',
    amount: '',
    label: 'M',
    key: 'M'
  }, {
    size: 'L',
    amount: '',
    label: 'L',
    key: 'L'
  }, {
    size: 'XL',
    amount: '',
    label: 'XL',
    key: 'XL'
  }, {
    size: 'XXL',
    amount: '',
    label: 'XXL',
    key: 'XXL'
  }]
}, {
  url: _rot["default"],
  title: (0, _i18n.t)('mockedData.red'),
  isSizeButtonClosed: false,
  sizes: [{
    size: 'S',
    amount: 100,
    label: 'S',
    key: 'S'
  }, {
    size: 'M',
    amount: '',
    label: 'M',
    key: 'M'
  }, {
    size: 'L',
    amount: '',
    label: 'L',
    key: 'L'
  }, {
    size: 'XL',
    amount: '',
    label: 'XL',
    key: 'XL'
  }, {
    size: 'XXL',
    amount: '',
    label: 'XXL',
    key: 'XXL'
  }]
}];
var amount = 0;
var componentRef = /*#__PURE__*/_react["default"].createRef();
var store = new _storybookState.Store({
  note: '100',
  focusedInput: false,
  notice: 'Bitte wie immer produzieren',
  priceData: mockedPriceData
});
(0, _react2.storiesOf)('PriceOverview', module).add('with checkboxes', function () {
  return /*#__PURE__*/_react["default"].createElement(_storybookState.State, {
    store: store
  }, function () {
    return /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
      item: true,
      xs: 12,
      md: 12
    }, /*#__PURE__*/_react["default"].createElement(_index["default"], {
      title: (0, _i18n.t)('amountPrice.priceOverview'),
      amount: amount,
      priceListComponent: /*#__PURE__*/_react["default"].createElement(_PriceList["default"], {
        amount: amount,
        list: mockedPriceData,
        totalPrice: "9,89 \u20AC",
        taxNote: (0, _i18n.t)('amountPrice.vatNotice'),
        showReceiveOfferForm: true,
        productTitle: (0, _i18n.t)('mockedData.Premium_Kapuzenjacke')
      }),
      productVariantComponent: /*#__PURE__*/_react["default"].createElement(_ProductVariant["default"], {
        header: (0, _i18n.t)('amountPrice.productVariants'),
        amountData: amountData,
        buttonLabel: (0, _i18n.t)('mockedData.selectSize'),
        amountLabel: (0, _i18n.t)('amountPrice.amount')
      }),
      addToCartComponent: /*#__PURE__*/_react["default"].createElement(_AddToBasket["default"], {
        note: store.notice,
        noteLabel: (0, _i18n.t)('amountPrice.notice'),
        buttonLabel: (0, _i18n.t)('receiveOfferForm.sendButton'),
        totalPrice: "9,89 \u20AC",
        taxNote: (0, _i18n.t)('amountPrice.vatNotice'),
        amount: amount,
        showReceiveOfferForm: true
      }),
      amountComponent: /*#__PURE__*/_react["default"].createElement(_AmountPrice["default"], {
        amount: 100,
        priceFormatted: "500,00 \u20AC"
      }),
      receiveOfferFormComponent: /*#__PURE__*/_react["default"].createElement(_ReceiveOfferForm["default"], {
        displayApproval: true,
        innerRef: componentRef
      })
    }));
  });
});