'use strict';

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

var vue = require('vue');
var index = require('../DatePanel/index.js');
var dateUtil = require('../../utils/dateUtil.js');
var useMergeProps = require('../../hooks/useMergeProps.js');
var classNames = require('../../../_util/classNames.js');

function WeekPanel(_props) {
  const props = useMergeProps.default(_props);
  const {
    prefixCls,
    generateConfig,
    locale,
    value
  } = props;
  const cellPrefixCls = `${prefixCls}-cell`;
  const prefixColumn = (date) => vue.createVNode("td", {
    "key": "week",
    "class": classNames.default(cellPrefixCls, `${cellPrefixCls}-week`)
  }, [generateConfig.locale.getWeek(locale.locale, date)]);
  const rowPrefixCls = `${prefixCls}-week-panel-row`;
  const rowClassName = (date) => classNames.default(rowPrefixCls, {
    [`${rowPrefixCls}-selected`]: dateUtil.isSameWeek(generateConfig, locale.locale, value, date)
  });
  return vue.createVNode(index.default, vue.mergeProps(props, {
    "panelName": "week",
    "prefixColumn": prefixColumn,
    "rowClassName": rowClassName,
    "keyboardConfig": {
      onLeftRight: null
    }
  }), null);
}
WeekPanel.displayName = "WeekPanel";
WeekPanel.inheritAttrs = false;

exports.default = WeekPanel;
//# sourceMappingURL=index.js.map
