'use strict';

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

var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');

var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _styledComponents = require('styled-components');

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _themeGet = require('../../../extensions/themeGet');

var _themeGet2 = _interopRequireDefault(_themeGet);

var _Icon = require('../../Icon');

var _Icon2 = _interopRequireDefault(_Icon);

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

var NudgeButtonBorder = _styledComponents2.default.button.withConfig({
  displayName: 'TimeScrubberNudgeButton__NudgeButtonBorder'
})(['padding:', ' ', ';border:', ' solid ', ';background:', ';color:', ';outline:none;cursor:pointer;transition:0.2s ease all;&:focus,&:active{outline:none;}&:focus{border-color:', ';}&:disabled{background:', ';border-color:', ';cursor:default;}'], (0, _themeGet2.default)('spacing.medium'), (0, _themeGet2.default)('spacing.small'), (0, _themeGet2.default)('thicknesses.wide'), (0, _themeGet2.default)('colors.border.light'), (0, _themeGet2.default)('colors.background.default'), (0, _themeGet2.default)('colors.gray.default'), (0, _themeGet2.default)('colors.primary.default'), (0, _themeGet2.default)('colors.background.disabled'), (0, _themeGet2.default)('colors.border.disabled'));

/**
 * A simple button which moves the time scrubber value forward or backward
 */
var NudgeButton = function NudgeButton(_ref) {
  var direction = _ref.direction,
      rest = (0, _objectWithoutProperties3.default)(_ref, ['direction']);
  return _react2.default.createElement(
    NudgeButtonBorder,
    rest,
    _react2.default.createElement(_Icon2.default, { name: direction === 'left' ? 'back' : 'forward' })
  );
};

NudgeButton.defaultProps = {
  direction: 'left'
};

exports.default = NudgeButton;