import CountTo from 'vue-count-to'

export const ModeItem = {
  name: 'ModeItem',
  props: {
    value: {
      type: Number,
      default: 0,
    },
    label: {
      type: String,
      default: '----'
    }
  },
  render(h) {
    return h('div', {
      class: 'mode-item',
    } , [
      h('div', { class: 'mode-item__count_warpper'  }, [
        h('div', { class: 'mode-item__count' }, [
          h(CountTo, { props: { startVal: 0 , endVal: this.value , separator: "", duration: 3000 } }, [])
        ])
      ]),
      h('div', {  class: 'mode-item__label' }, this.label),
    ])
  }
}
