'use strict';

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

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var normalizeComponent = require('./normalize-component-6fa50395.js');
var ThemeMixin = require('./ThemeMixin-a2f817cd.js');
var dayjs = _interopDefault(require('dayjs'));

var script = {
  name: 'VDateBadge',
  props: {
    date: {
      type: [String, Date, Number],
      required: true
    },
    skin: {
      type: String,
      default: 'primary',
      validator: function validator(value) {
        return ['primary', 'secondary'].indexOf(value) !== -1;
      }
    }
  },
  computed: {
    vDateBadgeCssClass: function vDateBadgeCssClass() {
      return ThemeMixin._objectSpread2(ThemeMixin._objectSpread2({}, this.themeCssClass), {}, ThemeMixin._defineProperty({
        'v-date-badge': true
      }, this.skin, !!this.skin));
    },
    formattedDateString: function formattedDateString() {
      return dayjs(this.date).format('YYYY-MM-DD H:mm');
    }
  },
  mixins: [ThemeMixin.ThemeMixin]
};

/* script */
const __vue_script__ = script;

/* template */
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('time',{class:_vm.vDateBadgeCssClass},[_vm._v("\n  "+_vm._s(_vm.formattedDateString)+"\n")])};
var __vue_staticRenderFns__ = [];

  /* style */
  const __vue_inject_styles__ = undefined;
  /* scoped */
  const __vue_scope_id__ = undefined;
  /* module identifier */
  const __vue_module_identifier__ = undefined;
  /* functional template */
  const __vue_is_functional_template__ = false;
  /* style inject */
  
  /* style inject SSR */
  

  
  var VDateBadge = normalizeComponent.__vue_normalize__(
    { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },
    __vue_inject_styles__,
    __vue_script__,
    __vue_scope_id__,
    __vue_is_functional_template__,
    __vue_module_identifier__,
    undefined,
    undefined
  );

exports.default = VDateBadge;
