'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = undefined;

var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');

var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);

var _createClass2 = require('babel-runtime/helpers/createClass');

var _createClass3 = _interopRequireDefault(_createClass2);

var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');

var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);

var _inherits2 = require('babel-runtime/helpers/inherits');

var _inherits3 = _interopRequireDefault(_inherits2);

var _dec,
    _class,
    _class2,
    _temp,
    _default_ht_number = Intl.NumberFormat('ht', { style: 'decimal' }).format;

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _classnames = require('classnames');

var _classnames2 = _interopRequireDefault(_classnames);

var _lib = require('@instructure/ui-themeable/lib');

var _lib2 = _interopRequireDefault(_lib);

var _theme = require('./theme');

var _theme2 = _interopRequireDefault(_theme);

var _formatMessage = require('../../../../format-message');

var _formatMessage2 = _interopRequireDefault(_formatMessage);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

var styles = {
  template: function template(theme) {
    return '/*  imported from styles.css  */\n\n.PositionSummary__styles__column {\n  display: flex;\n  flex-flow: column;\n}\n\n.PositionSummary__styles__firstNumberSummary {\n  padding-bottom: ' + theme.firstNumberSummaryPadding + ';\n}\n\n.PositionSummary__styles__secondNumberSummary {\n  padding-top: ' + theme.secondNumberSummaryPadding + ';\n}\n\n.PositionSummary__styles__numberSummary {\n  color: ' + theme.numberSummaryColor + ';\n  font-size: ' + theme.numberSummaryFontSize + ';\n  font-weight: ' + theme.numberSummaryFontWeight + ';\n  margin: auto;\n}\n\n.PositionSummary__styles__verticalDots {\n  margin: auto;\n  height: 1.5rem;\n  border-left: dotted ' + theme.verticalDotsBorderWidth + ';\n  border-color: ' + theme.verticalDotsBorderColor + ';\n}\n';
  },
  'column': 'PositionSummary__styles__column',
  'firstNumberSummary': 'PositionSummary__styles__firstNumberSummary',
  'secondNumberSummary': 'PositionSummary__styles__secondNumberSummary',
  'numberSummary': 'PositionSummary__styles__numberSummary',
  'verticalDots': 'PositionSummary__styles__verticalDots'
};
var PositionSummary = (_dec = (0, _lib2.default)(_theme2.default, styles), _dec(_class = (_temp = _class2 = function (_Component) {
  (0, _inherits3.default)(PositionSummary, _Component);

  function PositionSummary() {
    (0, _classCallCheck3.default)(this, PositionSummary);
    return (0, _possibleConstructorReturn3.default)(this, (PositionSummary.__proto__ || Object.getPrototypeOf(PositionSummary)).apply(this, arguments));
  }

  (0, _createClass3.default)(PositionSummary, [{
    key: 'render',
    value: function render() {
      return _react2.default.createElement(
        'div',
        { className: styles.column },
        _react2.default.createElement(
          'div',
          { className: (0, _classnames2.default)([styles.numberSummary, styles.firstNumberSummary]) },
          _default_ht_number(this.props.firstPosition)
        ),
        _react2.default.createElement('div', { className: styles.verticalDots }),
        _react2.default.createElement(
          'div',
          { className: (0, _classnames2.default)([styles.numberSummary, styles.secondNumberSummary]) },
          _default_ht_number(this.props.lastPosition)
        )
      );
    }
  }]);
  PositionSummary.displayName = 'PositionSummary'
  ;
  return PositionSummary;
}(_react.Component), _class2.propTypes = {
  firstPosition: _propTypes2.default.number.isRequired,
  lastPosition: _propTypes2.default.number.isRequired
}, _temp)) || _class);
exports.default = PositionSummary;