"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = exports.countdownProps = void 0;
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
var _vue = require("vue");
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _initDefaultProps = _interopRequireDefault(require("../_util/props-util/initDefaultProps"));
var _type = require("../_util/type");
var _Statistic = require("./Statistic");
var _Timer = _interopRequireDefault(require("./Timer"));
var _warning = require("../_util/warning");
const countdownProps = () => {
  return (0, _extends2.default)((0, _extends2.default)({}, (0, _Statistic.statisticProps)()), {
    value: (0, _type.someType)([Number, String, Object]),
    format: String,
    onFinish: Function,
    onChange: Function
  });
};
/**
 * @deprecated Please use `Statistic.Timer` instead.
 */
exports.countdownProps = countdownProps;
var _default = exports.default = (0, _vue.defineComponent)({
  compatConfig: {
    MODE: 3
  },
  name: 'AStatisticCountdown',
  props: (0, _initDefaultProps.default)(countdownProps(), {
    format: 'HH:mm:ss'
  }),
  slots: Object,
  setup(props, {
    slots
  }) {
    if (process.env.NODE_ENV !== 'production') {
      (0, _warning.deprecated)(false, 'Countdown', '<Statistic.Countdown />', '<Statistic.Timer type="countdown" />');
    }
    return () => {
      return (0, _vue.createVNode)(_Timer.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
        "type": "countdown"
      }), slots);
    };
  }
});