/**
 * ldesign v0.3.13
 * (c) 2023 ldesign
 * @license MIT
 */

import _defineProperty from '@babel/runtime/helpers/defineProperty';
import { defineComponent, createVNode } from 'vue';
import { usePrefixClass } from '../../hooks/useConfig.js';
import TDateHeader from '../base/Header.js';
import TDateTable from '../base/Table.js';
import _TimePickerPanel from '../../time-picker/panel/time-picker-panel.js';
import { getDefaultFormat } from '../../_common/js/date-picker/format.js';
import '../../config-provider/useConfig.js';
import 'lodash/cloneDeep';
import 'lodash/isFunction';
import 'lodash/isString';
import '../../config-provider/context.js';
import 'lodash/mergeWith';
import 'lodash/merge';
import 'lodash/isArray';
import '../../_common/js/global-config/default-config.js';
import '../../_common/js/global-config/locale/zh_CN.js';
import '@babel/runtime/helpers/typeof';
import '../../_chunks/dep-e041f5b0.js';
import 'dayjs';
import '@babel/runtime/helpers/toConsumableArray';
import '../../pagination/index.js';
import '../../utils/withInstall.js';
import '../../pagination/pagination.js';
import '@babel/runtime/helpers/objectWithoutProperties';
import '@babel/runtime/helpers/slicedToArray';
import 'lodash/isNaN';
import '@ldesign/icons-vue-next';
import 'lodash/isObject';
import '../../hooks/useGlobalIcon.js';
import '../../input-number/index.js';
import '../../input-number/input-number.js';
import '../../button/index.js';
import '../../button/button.js';
import '../../loading/index.js';
import '../../loading/directive.js';
import '../../loading/plugin.js';
import '../../utils/dom.js';
import '../../utils/easing.js';
import '../../loading/loading.js';
import '../../utils/render-tnode.js';
import 'lodash/isEmpty';
import 'lodash/camelCase';
import 'lodash/kebabCase';
import '../../hooks/useTeleport.js';
import '../../loading/props.js';
import '../../loading/icon/gradient.js';
import '../../_common/js/loading/circle-adapter.js';
import '../../_common/js/utils/set-style.js';
import '../../_common/js/utils/helper.js';
import 'lodash/isNull';
import 'lodash/isUndefined';
import 'lodash/isNumber';
import '../../hooks/useRipple.js';
import '../../utils/set-style.js';
import '../../hooks/useKeepAnimation.js';
import '../../form/hooks.js';
import '../../hooks/tnode.js';
import '../../button/props.js';
import '../../input/index.js';
import '../../input/input.js';
import '../../input/props.js';
import '../../input/useInput.js';
import '../../form/const.js';
import '../../hooks/useVModel.js';
import '../../input/useLengthLimit.js';
import '../../_common/js/log/log.js';
import '../../input/useInputEventHandler.js';
import '../../input/useInputWidth.js';
import '../../input/input-group.js';
import '../../input/input-group-props.js';
import '../../input-number/props.js';
import '../../input-number/useInputNumber.js';
import '../../hooks/useCommonClassName.js';
import '../../_common/js/input-number/number.js';
import 'lodash/isNil';
import '../../_common/js/input-number/large-number.js';
import '../../select/index.js';
import '../../select/select.js';
import 'lodash/pick';
import 'lodash/debounce';
import 'lodash/get';
import 'lodash/intersection';
import '../../common-components/fake-arrow.js';
import '../../select-input/index.js';
import '../../select-input/select-input.js';
import '../../popup/index.js';
import '../../popup/popup.js';
import '@popperjs/core';
import '../../popup/props.js';
import '../../popup/container.js';
import '../../hooks/useResizeObserver.js';
import '../../select-input/props.js';
import '../../select-input/useSingle.js';
import '../../hooks/useDefaultValue.js';
import '../../select-input/useMultiple.js';
import '../../tag-input/index.js';
import '../../tag-input/tag-input.js';
import '../../tag-input/props.js';
import '../../tag-input/hooks/useTagScroll.js';
import '../../tag-input/useTagList.js';
import '../../tag/index.js';
import '../../tag/tag.js';
import '../../tag/props.js';
import '../../tag/check-tag.js';
import '../../tag/check-tag-props.js';
import '../../tag-input/hooks/useHover.js';
import '../../tag-input/hooks/useDragSorter.js';
import '../../select-input/useOverlayInnerStyle.js';
import '../../select/props.js';
import '../../select/select-panel.js';
import 'lodash/omit';
import '../../select/option.js';
import '../../checkbox/index.js';
import '../../checkbox/checkbox.js';
import '../../checkbox/props.js';
import '../../checkbox/constants.js';
import '../../checkbox/group.js';
import '../../hooks/slot.js';
import '../../checkbox/checkbox-group-props.js';
import '../../select/option-props.js';
import '../../select/helper.js';
import '../../select/optionGroup.js';
import '../../select/option-group-props.js';
import '../../select/hooks/usePanelVirtualScroll.js';
import '../../hooks/useVirtualScroll.js';
import '../../select/hooks/useSelectOptions.js';
import '../../input-adornment/index.js';
import '../../input-adornment/input-adornment.js';
import '../../input-adornment/props.js';
import '../../pagination/props.js';
import '../../pagination/usePaginationClasses.js';
import '../../pagination/useMoreAction.js';
import '../../pagination/pagination-mini.js';
import '../../pagination/pagination-mini-props.js';
import '../base/Cell.js';
import '../../_common/js/date-picker/utils.js';
import '@babel/runtime/helpers/objectDestructuringEmpty';
import '@babel/runtime/helpers/extends';
import '../../_chunks/dep-e86e320e.js';
import 'lodash/chunk';
import '../../_common/js/time-picker/const.js';
import '../../time-picker/panel/props.js';
import 'lodash/isBoolean';
import '../../time-picker/props.js';
import '../../time-picker/panel/single-panel.js';
import 'lodash/range';
import 'lodash/padStart';
import '../../_common/js/time-picker/utils.js';

function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
var TPanelContent = defineComponent({
  name: "TPanelContent",
  props: {
    mode: String,
    format: String,
    enableTimePicker: Boolean,
    timePickerProps: {
      type: Object,
      "default": function _default() {
        return {};
      }
    },
    year: Number,
    month: Number,
    tableData: Array,
    time: String,
    firstDayOfWeek: Number,
    partial: String,
    popupVisible: Boolean,
    onYearChange: Function,
    onMonthChange: Function,
    onJumperClick: Function,
    onCellMouseEnter: Function,
    onCellClick: Function,
    onCellMouseLeave: Function,
    onTimePickerChange: Function,
    value: [String, Number, Array, Date]
  },
  setup: function setup(props) {
    var COMPONENT_NAME = usePrefixClass("date-picker__panel");
    var _getDefaultFormat = getDefaultFormat({
        mode: props.mode,
        format: props.format,
        enableTimePicker: props.enableTimePicker
      }),
      timeFormat = _getDefaultFormat.timeFormat;
    var defaultTimeValue = "00:00:00";
    return function () {
      return createVNode("div", {
        "class": "".concat(COMPONENT_NAME.value, "-content")
      }, [createVNode("div", {
        "class": "".concat(COMPONENT_NAME.value, "-").concat(props.mode)
      }, [createVNode(TDateHeader, {
        "mode": props.mode,
        "year": props.year,
        "month": props.month,
        "onMonthChange": function onMonthChange(val) {
          var _props$onMonthChange;
          return (_props$onMonthChange = props.onMonthChange) === null || _props$onMonthChange === void 0 ? void 0 : _props$onMonthChange.call(props, val, {
            partial: props.partial
          });
        },
        "onYearChange": function onYearChange(val) {
          var _props$onYearChange;
          return (_props$onYearChange = props.onYearChange) === null || _props$onYearChange === void 0 ? void 0 : _props$onYearChange.call(props, val, {
            partial: props.partial
          });
        },
        "onJumperClick": function onJumperClick(_ref) {
          var _props$onJumperClick;
          var trigger = _ref.trigger;
          return (_props$onJumperClick = props.onJumperClick) === null || _props$onJumperClick === void 0 ? void 0 : _props$onJumperClick.call(props, {
            trigger: trigger,
            partial: props.partial
          });
        }
      }, null), createVNode(TDateTable, {
        "mode": props.mode,
        "data": props.tableData,
        "time": props.time,
        "value": props.value,
        "format": props.format,
        "firstDayOfWeek": props.firstDayOfWeek,
        "onCellClick": function onCellClick(date, _ref2) {
          var _props$onCellClick;
          var e = _ref2.e;
          return (_props$onCellClick = props.onCellClick) === null || _props$onCellClick === void 0 ? void 0 : _props$onCellClick.call(props, date, {
            e: e,
            partial: props.partial
          });
        },
        "onCellMouseEnter": function onCellMouseEnter(date) {
          var _props$onCellMouseEnt;
          return (_props$onCellMouseEnt = props.onCellMouseEnter) === null || _props$onCellMouseEnt === void 0 ? void 0 : _props$onCellMouseEnt.call(props, date, {
            partial: props.partial
          });
        },
        "onCellMouseLeave": props.onCellMouseLeave
      }, null)]), props.enableTimePicker && createVNode("div", {
        "class": "".concat(COMPONENT_NAME.value, "-time")
      }, [createVNode("div", {
        "class": "".concat(COMPONENT_NAME.value, "-time-viewer")
      }, [props.time || defaultTimeValue]), createVNode(_TimePickerPanel, _objectSpread({
        key: props.partial,
        isShowPanel: props.popupVisible,
        format: timeFormat,
        value: props.time || defaultTimeValue,
        onChange: props.onTimePickerChange
      }, props.timePickerProps), null)])]);
    };
  }
});

export { TPanelContent as default };
//# sourceMappingURL=PanelContent.js.map
