var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { h } from '@stencil/core';
import { MapToComponentField, VegaSlimmer } from 'vega-slimmer/core';
/** renders different views based on the specified view mode using month, week, and day view render. */
export class VegaCalendarViewRenderer extends VegaSlimmer {
  /**
   * Get the calendar view content element ref
   *
   * @returns {Nullable<HTMLElement>} The div element.
   */
  getCalendarViewElementRef() {
    return this.calendarViewElementRef;
  }
  /**
   * render the calendar month/week/day view
   *
   * @returns {HTMLElement} html element
   */
  render() {
    return (h("div", { class: `calendar-view calendar-view-${this.viewMode} ${this.showWeekends === false ? 'calendar-hide-weekends' : ''}`, ref: (node) => (this.calendarViewElementRef = node) }, this.viewMode === 'month'
      ? this.monthViewRenderer.render()
      : this.viewWithTimeRenderer.render()));
  }
}
__decorate([
  MapToComponentField()
], VegaCalendarViewRenderer.prototype, "viewMode", void 0);
__decorate([
  MapToComponentField()
], VegaCalendarViewRenderer.prototype, "showWeekends", void 0);
__decorate([
  MapToComponentField()
], VegaCalendarViewRenderer.prototype, "monthViewRenderer", void 0);
__decorate([
  MapToComponentField()
], VegaCalendarViewRenderer.prototype, "viewWithTimeRenderer", void 0);
