/**
 * ldesign v0.2.14
 * (c) 2022/11/2 16:16 built by swimly
 * @license MIT
 */

import { h as helper } from '../../../chunks/helper.js';
import { defineComponent } from '@vue/composition-api';
import { g as getDefaultFormat } from '../../../chunks/format.js';
import { usePrefixClass } from '../../../hooks/use-config.js';
import TDateHeader from '../base/Header.js';
import TDateTable from '../base/Table.js';
import TTimePickerPanel from '../../time-picker/panel/time-picker-panel.js';
import '../../../chunks/_commonjsHelpers.js';
import '../../../chunks/dayjs.min-c4f4ce86.js';
import '../../../chunks/_commonjsHelpers-2e6815bd.js';
import '../../../chunks/log.js';
import '../../../chunks/utils.js';
import '../../../chunks/defineProperty-838e4192.js';
import '../../../chunks/_isIndex-52887d1e.js';
import '../../../chunks/isFunction-91acade7.js';
import '../../../chunks/isObjectLike-c22c7e3b.js';
import '../../../chunks/isSymbol-a38a5184.js';
import '../../config-provider/useConfig.js';
import '../../config-provider/context.js';
import 'lodash';
import '../../../chunks/zh_CN.js';
import '../../config-provider/type.js';
import '../../jumper/jumper.js';
import 'lodash/isObject';
import '@ldesign/icons-vue';
import '../../../hooks/use-global-icon.js';
import '../../button/index.js';
import '../../../utils/with-install.js';
import 'vue';
import '../../../config.js';
import '../../button/button.js';
import '../../loading/index.js';
import '../../loading/loading.js';
import '../../../utils/dom.js';
import 'raf';
import 'lodash/isString';
import '../../../chunks/index.js';
import '../../../utils/easing.js';
import '../../../utils/render-node.js';
import '../../../utils/transfer-dom.js';
import '../../config-provider/config-receiver.js';
import 'lodash/mergeWith';
import '../../../utils/mixins.js';
import '../../loading/props.js';
import '../../loading/icon/gradient.js';
import '../../../chunks/set-style.js';
import '../../../chunks/helper2.js';
import '../../loading/style/css.js';
import '../../loading/type.js';
import '../../loading/plugin.js';
import '../../../utils/ripple.js';
import '../../button/props.js';
import '../../button/style/css.js';
import '../../button/type.js';
import '../../jumper/props.js';
import '../../select/select.js';
import 'lodash/isFunction';
import 'lodash/debounce';
import 'lodash/get';
import 'lodash/cloneDeep';
import 'lodash/isArray';
import '../../../hooks/use-default-value.js';
import '../../../hooks/use-vmodel.js';
import 'lodash/kebabCase';
import '../../../hooks/lnode.js';
import 'lodash/isEmpty';
import 'lodash/camelCase';
import '../../../hooks/render-lnode.js';
import '../../popup/index.js';
import '../../../utils/map-props.js';
import '../../popup/popup.js';
import '@popperjs/core';
import '../../../utils/helper.js';
import '../../popup/props.js';
import '../../popup/container.js';
import '../../popup/style/css.js';
import '../../popup/type.js';
import '../../input/index.js';
import '../../input/input.js';
import '../../../utils/event.js';
import '../../input/props.js';
import '../../input/group.js';
import '../../input/style/css.js';
import '../../input/type.js';
import '../../tag/index.js';
import '../../tag/tag.js';
import '../../tag/props.js';
import '../../tag/check-tag.js';
import '../../tag/style/css.js';
import '../../tag/type.js';
import '../../select-input/index.js';
import '../../select-input/select-input.js';
import '../../select-input/props.js';
import '../../select-input/hooks/use-single.js';
import 'lodash/pick';
import '../../select-input/hooks/use-multiple.js';
import '../../tag-input/index.js';
import '../../tag-input/tag-input.js';
import '../../tag-input/props.js';
import '../../tag-input/hooks/use-tag-scroll.js';
import '../../tag-input/hooks/use-tag-list.js';
import '../../tag-input/hooks/use-hover.js';
import '../../tag-input/hooks/use-drag-sorter.js';
import '../../tag-input/style/css.js';
import '../../tag-input/type.js';
import '../../select-input/hooks/use-overlay-innerstyle.js';
import '../../select-input/style/css.js';
import '../../select-input/type.js';
import '../../common/fake-arrow.js';
import '../../../hooks/use-form-disabled.js';
import '../../select/option.js';
import '../../checkbox/index.js';
import '../../checkbox/group.js';
import 'lodash/intersection';
import '../../checkbox/checkbox.js';
import '../../checkbox/props.js';
import '../../checkbox/style/css.js';
import '../../checkbox/type.js';
import '../../../hooks/use-lazy-load.js';
import '../../../chunks/observe.js';
import '../../../hooks/use-common-classname.js';
import '../../select/utils.js';
import '../../select/props.js';
import '../../select/select-panel.js';
import '../../../hooks/use-virtual-scroll.js';
import '../../select/hooks/use-select-options.js';
import '../base/Cell.js';
import 'dayjs';
import '../../../chunks/single-panel.js';
import 'lodash/range';
import 'lodash/padStart';
import '../../time-picker/panel/props.js';
import '../../time-picker/props.js';

var TPanelContent = defineComponent({
  name: "LPanelContent",
  props: {
    mode: String,
    format: String,
    enableTimePicker: Boolean,
    timePickerProps: {
      type: Object,
      default: () => ({})
    },
    value: [String, Number, Array, Date],
    year: Number,
    month: Number,
    tableData: Array,
    time: String,
    popupVisible: Boolean,
    firstDayOfWeek: Number,
    partial: String,
    onYearChange: Function,
    onMonthChange: Function,
    onJumperClick: Function,
    onCellMouseEnter: Function,
    onCellClick: Function,
    onCellMouseLeave: Function,
    onTimePickerChange: Function
  },
  setup(props) {
    const COMPONENT_NAME = usePrefixClass("date-picker__panel");
    const {
      timeFormat
    } = getDefaultFormat({
      mode: props.mode,
      format: props.format,
      enableTimePicker: props.enableTimePicker
    });
    const defaultTimeValue = "00:00:00";
    return {
      COMPONENT_NAME,
      defaultTimeValue,
      timeFormat
    };
  },
  render() {
    const h = arguments[0];
    const {
      COMPONENT_NAME,
      defaultTimeValue,
      timeFormat
    } = this;
    return h("div", {
      "class": `${COMPONENT_NAME}-content`
    }, [h("div", {
      "class": `${COMPONENT_NAME}-${this.mode}`
    }, [h(TDateHeader, {
      "props": {
        ...{
          mode: this.mode,
          year: this.year,
          month: this.month,
          onMonthChange: val => {
            var _this$onMonthChange;
            return (_this$onMonthChange = this.onMonthChange) === null || _this$onMonthChange === void 0 ? void 0 : _this$onMonthChange.call(this, val, {
              partial: this.partial
            });
          },
          onYearChange: val => {
            var _this$onYearChange;
            return (_this$onYearChange = this.onYearChange) === null || _this$onYearChange === void 0 ? void 0 : _this$onYearChange.call(this, val, {
              partial: this.partial
            });
          },
          onJumperClick: _ref => {
            var _this$onJumperClick;
            let {
              trigger
            } = _ref;
            return (_this$onJumperClick = this.onJumperClick) === null || _this$onJumperClick === void 0 ? void 0 : _this$onJumperClick.call(this, {
              trigger,
              partial: this.partial
            });
          }
        }
      }
    }), h(TDateTable, {
      "props": {
        ...{
          mode: this.mode,
          data: this.tableData,
          time: this.time,
          value: this.value,
          format: this.format,
          firstDayOfWeek: this.firstDayOfWeek,
          onCellClick: (date, _ref2) => {
            var _this$onCellClick;
            let {
              e
            } = _ref2;
            return (_this$onCellClick = this.onCellClick) === null || _this$onCellClick === void 0 ? void 0 : _this$onCellClick.call(this, date, {
              e,
              partial: this.partial
            });
          },
          onCellMouseEnter: date => {
            var _this$onCellMouseEnte;
            return (_this$onCellMouseEnte = this.onCellMouseEnter) === null || _this$onCellMouseEnte === void 0 ? void 0 : _this$onCellMouseEnte.call(this, date, {
              partial: this.partial
            });
          },
          onCellMouseLeave: this.onCellMouseLeave
        }
      }
    })]), this.enableTimePicker && h("div", {
      "class": `${COMPONENT_NAME}-time`
    }, [h("div", {
      "class": `${COMPONENT_NAME}-time-viewer`
    }, [this.time || defaultTimeValue]), h(TTimePickerPanel, helper([{}, {
      key: this.partial,
      props: {
        format: timeFormat,
        value: this.time || defaultTimeValue,
        onChange: this.onTimePickerChange,
        isShowPanel: this.popupVisible,
        ...this.timePickerProps
      }
    }]))])]);
  }
});

export { TPanelContent as default };
//# sourceMappingURL=panel-content.js.map
