import { createVNode as _createVNode } from "vue";
import { defineComponent } from "vue";
import Icon from "../icon";
export default defineComponent({
  props: {
    prefixCls: String,
    value: Object,
    title: String
  },
  emits: ['change', 'panelChange', 'prev', 'next'],

  setup(props, {
    attrs,
    emit
  }) {
    function prev() {
      emit('prev');
    }

    function next() {
      emit('next');
    }

    function showMonthPanel() {
      emit('panelChange');
    }

    return () => {
      const {
        prefixCls,
        value
      } = props;
      return _createVNode("div", {
        "class": `${prefixCls}_header`
      }, [_createVNode("span", {
        "class": `${prefixCls}_header_title`,
        "onClick": showMonthPanel
      }, [props.title || value.format('YYYY年M月')]), _createVNode("span", {
        "class": `${prefixCls}_prev-btn`,
        "onClick": prev
      }, [_createVNode(Icon, {
        "type": "arrow-up"
      }, null)]), _createVNode("span", {
        "class": `${prefixCls}_next-btn`,
        "onClick": next
      }, [_createVNode(Icon, {
        "type": "arrow-down"
      }, null)])]);
    };
  }

});