import moment from 'moment';
export default function getDuration(_ref) {
  var value = _ref.value,
      _ref$unit = _ref.unit,
      unit = _ref$unit === void 0 ? 's' : _ref$unit;
  var duration = moment.duration(value, unit);
  var seconds = duration.seconds();
  var minutes = duration.minutes();
  var hours = duration.hours();
  var days = duration.days();
  return "".concat(days ? "".concat(days, "\u5929") : '').concat(hours ? "".concat(hours, "\u5C0F\u65F6") : '').concat(minutes ? "".concat(minutes, "\u5206\u949F") : '').concat(seconds ? "".concat(seconds, "\u79D2") : '');
}