'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

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

var _styledComponents2 = _interopRequireDefault(_styledComponents);

var _Label = require('../../Label');

var _Label2 = _interopRequireDefault(_Label);

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

var _themeGet2 = _interopRequireDefault(_themeGet);

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

var Display = (0, _styledComponents2.default)(_Label2.default).withConfig({
  displayName: 'TimeScrubberTimeDisplay__Display'
})(['position:absolute;top:', ';left:0;right:0;text-align:center;pointer-events:none;'], (0, _themeGet2.default)('spacing.small'));

/**
 * Displays the provided time within a TimeScrubber viewport
 */
var TimeDisplay = function TimeDisplay(_ref) {
  var time = _ref.time;
  return _react2.default.createElement(
    Display,
    null,
    time && time.format('h:mm A')
  );
};

exports.default = TimeDisplay;