/**
 * tdesign v0.39.1-alpha.1
 * (c) 2022 tdesign
 * @license MIT
 */

'use strict';

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

var Vue = require('vue');
var button_index = require('../button/index.js');
var config = require('../config.js');
require('../button/button.js');
require('../_chunks/dep-33ee4bce.js');
require('@babel/runtime/helpers/defineProperty');
require('../utils/classnames.js');
require('../loading/index.js');
require('../loading/loading.js');
require('../loading/icon/gradient.js');
require('../_common/js/loading/circle-adapter.js');
require('../_common/js/utils/set-style.js');
require('../_common/js/utils/helper.js');
require('@babel/runtime/helpers/objectWithoutProperties');
require('@babel/runtime/helpers/slicedToArray');
require('../utils/dom.js');
require('raf');
require('lodash/isString');
require('../utils/easing.js');
require('../utils/render-tnode.js');
require('@babel/runtime/helpers/typeof');
require('lodash/isObject');
require('../utils/transfer-dom.js');
require('../loading/props.js');
require('../utils/withInstall.js');
require('lodash/capitalize');
require('../loading/plugin.js');
require('../button/props.js');
require('../utils/ripple.js');
require('../config-provider/config-receiver.js');
require('lodash/mergeWith');
require('../config-provider/context.js');
require('lodash/merge');
require('../_common/js/global-config/default-config.js');
require('../_common/js/global-config/locale/zh_CN.js');
require('../utils/mixins.js');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var Vue__default = /*#__PURE__*/_interopDefaultLegacy(Vue);

var CalendarPresets = Vue__default["default"].extend({
  components: {
    TButton: button_index.Button
  },
  props: {
    global: {
      type: Object
    },
    presets: {
      type: Object
    },
    onClick: Function
  },
  methods: {
    clickPreset: function clickPreset(value) {
      this.onClick(value);
    }
  },
  render: function render() {
    var _this = this;

    var h = arguments[0];
    var presets = this.presets;
    return h("div", {
      "class": "".concat(config.prefix, "-date-picker__presets")
    }, [h("ul", [presets && Object.keys(presets).map(function (key) {
      return h("li", {
        "key": key
      }, [h("a", {
        "on": {
          "click": function click() {
            return _this.clickPreset(presets[key]);
          }
        }
      }, [key])]);
    })])]);
  }
});

exports["default"] = CalendarPresets;
//# sourceMappingURL=calendar-presets.js.map
