'use strict';

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

var React = require('react');
var ui_Label = require('../index-35633fb6.js');
require('prop-types');
require('../stringSet-ce782136.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var React__default = /*#__PURE__*/_interopDefaultLegacy(React);

const PlaybackTime = _ref => {
  let {
    className,
    time = 0,
    labelType = ui_Label.LabelTypography.CAPTION_2,
    labelColor = ui_Label.LabelColors.ONCONTENT_1
  } = _ref;
  const naturalTime = time < 0 ? 0 : time;
  const hour = Math.floor(naturalTime / 3600000);
  const min = Math.floor(naturalTime % 3600000 / 60000);
  const sec = Math.floor(naturalTime % 3600000 % 60000 / 1000);
  return /*#__PURE__*/React__default["default"].createElement("div", {
    className: `sendbird-ui-play-time ${className}`
  }, /*#__PURE__*/React__default["default"].createElement(ui_Label.Label, {
    type: labelType,
    color: labelColor
  }, `${hour ? hour + ':' : ''}${min < 10 ? '0' : ''}${min ? min : '0'}:${sec < 10 ? '0' : ''}${sec}`));
};

exports.PlaybackTime = PlaybackTime;
exports["default"] = PlaybackTime;
//# sourceMappingURL=PlaybackTime.js.map
