{# djlint:off #}
[
	{% for x in usage_events %}
	{
		"title": "Usage of the {{ x.tool.name }}",
		"id": {{ x.id }},
		"color": "#33ad33",
		"start": "{{ x.start|date:"c" }}",
		{# Usage events that are less than 15 minutes are artificially lengthened for display purposes. #}
		"end": "{{ x.get_visual_end|date:"c" }}",
		"details_url": "{% url 'usage_details' x.id %}"
	}{% if not forloop.last %},{% elif area_access_events or reservations or missed_reservations %},{% endif %}
	{% endfor %}
	{% for x in area_access_events %}
	{
		"title": "{{ x.area }} access billed to project {{ x.project }} {% if x.staff_charge %}by {{ x.staff_charge.staff_member }}{% endif %}",
		"id": {{ x.id }},
		"color": "#e68a00",
		"start": "{{ x.start|date:"c" }}",
		{# Area access events that are less than 15 minutes are artificially lengthened for display purposes. #}
		"end": "{{ x.get_visual_end|date:"c" }}",
		"details_url": "{% url 'area_access_details' x.id %}"
	}{% if not forloop.last %},{% elif reservations or missed_reservations %},{% endif %}
	{% endfor %}
	{% for x in reservations %}
	{
		"title": "Reservation for the {{ x.reservation_item.name }}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}",
		"id": {{ x.id }},
		"color": {% if x.tool %}"{{ x.reservation_item.tool_calendar_color|default:'#33ad33' }}"{% elif x.area %}"{{ x.reservation_item.area_calendar_color|default:'#88B7CD' }}"{% endif %},
		"start": "{{ x.start|date:"c" }}",
		"end": "{{ x.get_visual_end|date:"c" }}",
		"details_url": "{% url 'reservation_details' x.id %}"
	}{% if not forloop.last %},{% elif missed_reservations %},{% endif %}
	{% endfor %}
	{% for x in missed_reservations %}
	{
		"title": "Missed reservation for the {{ x.reservation_item.name }}",
		"id": {{ x.id }},
		"color": {% if x.tool %}"#ff0000"{% elif x.area %}"#FF6666"{% endif %},
		"start": "{{ x.start|date:"c" }}",
		"end": "{{ x.get_visual_end|date:"c" }}",
		"details_url": "{% url 'reservation_details' x.id %}"
	}{% if not forloop.last %},{% endif %}
	{% endfor %}
]
