import PropTypes from 'prop-types'
import { utils } from '../utils';

const Months = ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre']

export class AnniveraryDateUtil {
    
  static getZeroLeadedText(text:any) {
    return `0${text}`.slice(-2)
  }

  static getMonth(index:any, abbreviated:any) {
    if (!abbreviated) return Months[index]
    return Months[index].substring(0, 3).toUpperCase()
  }

  static utils(orientation:any, size :any = undefined) {
    return utils(orientation, size)
  }

  static commonPropTypes() {
    return {
      day: PropTypes.number.isRequired,
      dayFormat: PropTypes.object,
      month: PropTypes.number.isRequired,
      monthFormat: PropTypes.object,
      primaryColor: PropTypes.string,
      abbreviatedMonths: PropTypes.bool,
      orientation: PropTypes.string
    }
  }
}
 
