/**
 * ldesign v0.2.22
 * (c) 2022/12/7 16:21 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/useConfig.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-0f6442fd.js');
require('../../../chunks/_commonjsHelpers-fe796db6.js');
require('../../../chunks/log.js');
require('../../../chunks/utils.js');
require('../../../chunks/defineProperty-19da3d4c.js');
require('../../../chunks/_isIndex-8b06cfbb.js');
require('../../../chunks/isFunction-cb08cfdf.js');
require('../../../chunks/isObjectLike-51896b77.js');
require('../../../chunks/isSymbol-0ea4cedf.js');
require('../../config-provider/useConfig.js');
require('../../config-provider/context.js');
require('lodash/merge');
require('lodash/mergeWith');
require('../../../chunks/zh_CN.js');
require('../../pagination/index.js');
require('../../../utils/withInstall.js');
require('vue');
require('lodash/capitalize');
require('../../../config.js');
require('../../../utils/map-props.js');
require('../../pagination/pagination-mini.js');
require('lodash/isObject');
require('@ldesign/icons-vue');
require('../../../hooks/useGlobalIcon.js');
require('../../button/index.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('lodash');
require('../../../utils/transfer-dom.js');
require('../../config-provider/config-receiver.js');
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('../../pagination/props.js');
require('../../pagination/pagination.js');
require('../../input-number/index.js');
require('../../input-number/input-number.js');
require('../../input/index.js');
require('../../input/input.js');
require('lodash/camelCase');
require('lodash/kebabCase');
require('../../../utils/helper.js');
require('../../../utils/event.js');
require('../../input/props.js');
require('../../input/group.js');
require('../../input-number/props.js');
require('../../input-number/hooks/use-input-number.js');
require('../../../chunks/isArray-6b6e7094.js');
require('../../../chunks/isNumber-13851330.js');
require('../../../hooks/useCommonClassName.js');
require('../../../hooks/useVModel.js');
require('../../../hooks/useFormDisabled.js');
require('../../select/index.js');
require('../../select/select.js');
require('lodash/isFunction');
require('lodash/debounce');
require('lodash/get');
require('lodash/cloneDeep');
require('lodash/isArray');
require('../../../hooks/useDefaultValue.js');
require('../../../hooks/lnode.js');
require('lodash/isEmpty');
require('../../../hooks/render-lnode.js');
require('../../popup/index.js');
require('../../popup/popup.js');
require('@popperjs/core');
require('../../popup/props.js');
require('../../popup/container.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('../../select/option.js');
require('../../checkbox/index.js');
require('../../checkbox/group.js');
require('lodash/intersection');
require('../../checkbox/checkbox.js');
require('../../checkbox/props.js');
require('../../../hooks/useLazyLoad.js');
require('../../../chunks/observe.js');
require('../../select/utils.js');
require('../../select/props.js');
require('../../select/select-panel.js');
require('../../../hooks/useVirtualScroll.js');
require('../../select/hooks/use-select-options.js');
require('../../select/option-group.js');
require('../../input-adornment/index.js');
require('../../input-adornment/input-adornment.js');
require('../../input-adornment/props.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 => this.onMonthChange?.(val, {
            partial: this.partial
          }),
          onYearChange: val => this.onYearChange?.(val, {
            partial: this.partial
          }),
          onJumperClick: _ref => {
            let {
              trigger
            } = _ref;
            return this.onJumperClick?.({
              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) => {
            let {
              e
            } = _ref2;
            return this.onCellClick?.(date, {
              e,
              partial: this.partial
            });
          },
          onCellMouseEnter: date => this.onCellMouseEnter?.(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
