function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }

import React from 'react';
import getCompliedClassName from '../../../utils/getCompliedClassName';
import getCompliedCustomId from '../../../utils/getCompliedCustomId';
import style from './Year.module.css';

function YearSkeleton(props) {
  const {
    year,
    isActive,
    onClick,
    eleRef,
    disabled,
    customId,
    customClassName,
    tagAttributeProps
  } = props;
  let yearClass = getCompliedClassName(customClassName, {
    [style.year]: true,
    [style.isActive]: !!isActive,
    [style.disabled]: !!disabled
  }, {
    [customClassName.active]: !!customClassName.active,
    [customClassName.shape]: !!customClassName.shape,
    [customClassName.hover]: !!customClassName.hover,
    [customClassName.disabled]: !!customClassName.disabled
  });
  let yearTextClass = getCompliedClassName(customClassName, {
    [style.yearText]: true
  }, {
    [customClassName.active]: !!customClassName.active,
    [customClassName.shape]: !!customClassName.shape,
    [customClassName.hover]: !!customClassName.hover,
    [customClassName.disabled]: !!customClassName.disabled
  });
  return /*#__PURE__*/React.createElement("div", _extends({
    className: yearClass,
    onClick: onClick,
    dataId: getCompliedCustomId(props, customId.year),
    ref: eleRef
  }, tagAttributeProps), /*#__PURE__*/React.createElement("div", {
    className: yearTextClass
  }, year));
}

export default YearSkeleton;