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

'use strict';

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

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

var TPanelContent = VueCompositionAPI.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 = hooks_useConfig.usePrefixClass("date-picker__panel");
    const {
      timeFormat
    } = format.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(components_datePicker_base_Header["default"], {
      "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(components_datePicker_base_Table["default"], {
      "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(components_timePicker_panel_timePickerPanel["default"], helper.helper([{}, {
      key: this.partial,
      props: {
        format: timeFormat,
        value: this.time || defaultTimeValue,
        onChange: this.onTimePickerChange,
        isShowPanel: this.popupVisible,
        ...this.timePickerProps
      }
    }]))])]);
  }
});

exports["default"] = TPanelContent;
//# sourceMappingURL=panel-content.js.map
