import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import { createVNode as _createVNode } from "vue";
import _extends from "@babel/runtime/helpers/esm/extends";
import { defineComponent } from 'vue';
import initDefaultProps from '../_util/props-util/initDefaultProps';
import { someType } from '../_util/type';
import { statisticProps } from './Statistic';
import Timer from './Timer';
import { deprecated } from '../_util/warning';
export const countdownProps = () => {
  return _extends(_extends({}, statisticProps()), {
    value: someType([Number, String, Object]),
    format: String,
    onFinish: Function,
    onChange: Function
  });
};
/**
 * @deprecated Please use `Statistic.Timer` instead.
 */
export default defineComponent({
  compatConfig: {
    MODE: 3
  },
  name: 'AStatisticCountdown',
  props: initDefaultProps(countdownProps(), {
    format: 'HH:mm:ss'
  }),
  slots: Object,
  setup(props, {
    slots
  }) {
    if (process.env.NODE_ENV !== 'production') {
      deprecated(false, 'Countdown', '<Statistic.Countdown />', '<Statistic.Timer type="countdown" />');
    }
    return () => {
      return _createVNode(Timer, _objectSpread(_objectSpread({}, props), {}, {
        "type": "countdown"
      }), slots);
    };
  }
});