<?php

namespace SugarCalendarBookings\Calendar;

use SugarCalendarBookings\Support\AbstractDTO;

/**
 * Display hour bounds for calendar grid.
 *
 * @since 1.4.0
 *
 * @property int $start Minutes from midnight (0-1380).
 * @property int $end   Minutes from midnight (0-1380).
 */
class DisplayBounds extends AbstractDTO {

	/**
	 * Required fields.
	 *
	 * @since 1.4.0
	 *
	 * @var array
	 */
	protected $required_fields = [ 'start', 'end' ];

	/**
	 * Default bounds (09:00-17:00).
	 *
	 * @since 1.4.0
	 *
	 * @return self
	 */
	public static function fallback(): self {

		return new self(
			[
				'start' => CalendarDisplayRangeService::FALLBACK_START,
				'end'   => CalendarDisplayRangeService::FALLBACK_END,
			]
		);
	}
}
