'use strict';

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

var vue = require('vue');
require('../../../../../utils/index.cjs');
var index = require('../DatePanel/index.cjs');
var dateUtil = require('../../utils/dateUtil.cjs');
var useMergeProps = require('../../hooks/useMergeProps.cjs');
var _class = require('../../../../../utils/dom/class.cjs');

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": _class.classNames(cellPrefixCls, `${cellPrefixCls}-week`)
  }, [generateConfig.locale.getWeek(locale.locale, date)]);
  const rowPrefixCls = `${prefixCls}-week-panel-row`;
  const rowClassName = (date) => _class.classNames(rowPrefixCls, {
    [`${rowPrefixCls}-selected`]: dateUtil.isSameWeek(generateConfig, locale.locale, value, date)
  });
  return vue.createVNode(index.default, {
    ...props,
    "panelName": "week",
    "prefixColumn": prefixColumn,
    "rowClassName": rowClassName,
    "keyboardConfig": {
      onLeftRight: null
    }
  }, null);
}
WeekPanel.displayName = "WeekPanel";
WeekPanel.inheritAttrs = false;

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