'use strict';

require('../../../utils/index.js');
var runtime = require('../../../utils/props/runtime.js');

"use strict";
const heatmapColorThemes = {
  green: ["#9be9a8", "#40c463", "#30a14e", "#216e39"],
  blue: ["#b6e3ff", "#66b7ff", "#2f7ef7", "#1d4ed8"],
  orange: ["#fed7aa", "#fb923c", "#ea580c", "#c2410c"],
  purple: ["#e9d5ff", "#c084fc", "#9333ea", "#7c3aed"],
  red: ["#fecaca", "#f87171", "#dc2626", "#b91c1c"]
};
const FIRST_DAY_OF_WEEK = [0, 1, 2, 3, 4, 5, 6];
const heatmapProps = runtime.buildProps({
  activeColors: {
    type: runtime.definePropType(Array),
    default: void 0
  },
  colorTheme: {
    type: runtime.definePropType(String),
    default: "green"
  },
  data: {
    type: runtime.definePropType(Array),
    default: () => []
  },
  loading: {
    type: Boolean,
    default: false
  },
  loadingData: {
    type: runtime.definePropType(Array),
    default: void 0
  },
  minimumColor: {
    type: String,
    default: ""
  },
  fillCalendarLeading: {
    type: Boolean,
    default: false
  },
  firstDayOfWeek: {
    type: Number,
    values: FIRST_DAY_OF_WEEK,
    default: 0
  },
  showColorIndicator: {
    type: Boolean,
    default: true
  },
  indicatorVerticalPosition: {
    type: runtime.definePropType(String),
    default: "bottom"
  },
  indicatorHorizontalAlign: {
    type: runtime.definePropType(String),
    default: "right"
  },
  showMonthLabels: {
    type: Boolean,
    default: true
  },
  showWeekLabels: {
    type: Boolean,
    default: true
  },
  size: {
    type: runtime.definePropType(String),
    default: "medium"
  },
  tooltip: {
    type: runtime.definePropType(Object),
    default: () => ({
      show: false,
      placement: "top",
      arrow: true,
      bgColor: void 0,
      textColor: void 0,
      isWhiteBg: false,
      maxWidth: "240px",
      tipEllipsis: false,
      tipEllipsisLine: 1,
      overlayClassName: "",
      overlayStyle: {},
      ellipsis: false,
      width: "",
      containerStyle: {},
      showContainer: false
    })
  },
  unit: {
    type: String,
    default: ""
  },
  xGap: {
    type: runtime.definePropType([Number, String]),
    default: void 0
  },
  yGap: {
    type: runtime.definePropType([Number, String]),
    default: void 0
  }
});
const heatmapMockData = (year = "recent") => {
  const result = [];
  const today = /* @__PURE__ */ new Date();
  const endDate = new Date(today.getFullYear(), today.getMonth(), today.getDate());
  const startDate = year === "recent" ? new Date(endDate.getFullYear(), endDate.getMonth(), endDate.getDate() - 364) : new Date(year, 0, 1);
  const finalDate = year === "recent" ? endDate : new Date(year, 11, 31);
  for (let current = new Date(startDate); current <= finalDate; current.setDate(current.getDate() + 1)) {
    const seed = current.getDate() + current.getMonth() * 3;
    const random = Math.random();
    let value = 0;
    if (random > 0.65) {
      value = Math.floor((random + seed / 31) % 1 * 12) + 1;
    }
    result.push({
      timestamp: current.getTime(),
      value
    });
  }
  return result;
};

exports.heatmapColorThemes = heatmapColorThemes;
exports.heatmapMockData = heatmapMockData;
exports.heatmapProps = heatmapProps;
//# sourceMappingURL=heatmap.js.map
