
.Panel-expandableRow.lineup-slot
	=form.hidden_field name="[event_lineup_entries][][label]", value: !event_lineup_entry.nil? ? event_lineup_entry['label'] : nil
	=form.hidden_field name="[event_lineup_entries][][sequence]", value: !event_lineup_entry.nil? ? event_lineup_entry['sequence'] : nil
	=form.hidden_field name="[event_lineup_entries][][member_id]", value: member.id
	=form.hidden_field name="[event_lineup_entries][][event_id]", value: event.id
	=form.hidden_field name="[event_lineup_entries][][id]", value: !event_lineup_entry.nil? ? event_lineup_entry['id'] : nil
	=form.hidden_field name="[event_lineup_entries][][availability_status_code]", value: availability.status_code
	=form.hidden_field name="[event_lineup_entries][][member][last_name]", value: member.last_name
	=form.hidden_field name="[event_lineup_entries][][member][first_name]", value: member.first_name
	=form.hidden_field name="[event_lineup_entries][][member][jersey_number]", value: member.jersey_number
	=form.hidden_field name="[event_lineup_entries][][member][email_addresses]", value: member.email_addresses
	- if event_lineup_entry
		- selected_position, flags = extract_flags(event_lineup_entry)
		div.u-hidden #{selected_position} #{flags}
	- else
		- selected_position = "--"
	.Panel-row.Panel-row--withCells.Panel-row--parent
		.Panel-cell.Panel-cell--header.u-padXs.u-sizeFit
			a.Panel-expandableControl onclick="this.classList.toggle('is-expanded');this.closest('.Panel-expandableRow').querySelector('.Panel-childRows').classList.toggle('is-expanded')"
				<span class="Panel-expandableControlIcon">
					<svg viewBox="0 0 960 960" class="Icon"><path d="M497 854c-6.7 6.7-14.7 10-24 10H225c-14.7 0-24.7-6.3-30-19-2-4-3-8.3-3-13 0-7.3 2.7-14.3 8-21l313-331-313-330c-9.3-11.3-11-23-5-35 6-12.7 16-19 30-19h248c10 0 18 3.7 24 11l326 352c6 6 9 13 9 21s-3 15.3-9 22L497 854z"/></svg>
				</span>
			.u-flexAlignSelfCenter.Panel-expandableControl
				div.sequence.u-textNoWrap style="width:2ch;"
		div(class="Panel-cell u-padXs u-size6of12 u-xs-size8of12.u-sm-size10of12 d-block")
			div class="d-flex availability-status-code-#{availability.status_code}"
				div
					span.lastname #{member.last_name}
					span.lastname.u-hidden.u-md-inline , #{member.first_name}
					span.jerseynumber.u-hidden.u-md-inline ##{member.jersey_number}
					
		.Panel-cell.u-padXs.u-size3of12.u-xs-size2of12.u-sm-size1of12
			.SelectBox.position-selection 
				select(onchange="onPositionSelectChange(this)" class="position-select-box SelectBox-options")
					=options_for_select ["--", "P", "C", "1B", "2B", "3B", "SS", "LF", "CF", "RF", "EH", "DH"], selected_position 
		.Panel-cell.u-padXs.u-flexAlignSelfCenter.u-size1of12
			.drag-handle
					i.bi.bi-grip-vertical.text-secondary.drag-handle
	.Panel-childRows
		.Panel-row.Panel-row--withCells
			- for timeline_i in [*4.downto(1).to_a,*5...9]
				- unless timeline[timeline_i].nil? or timeline[timeline_i][:event].nil?
					.Panel-cell.u-padXs
						.span.u-textDecorationNone class="Tooltip Tooltip--text" data-tooltip="#{timeline[timeline_i][:event].formatted_title}"
							| #{timeline[timeline_i][:event].start_date.strftime("%a, %-m/%-d")}
		.Panel-row.Panel-row--withCells	
			- for timeline_i in [*4.downto(1).to_a,*5...9]
				- unless timeline[timeline_i].nil? or timeline[timeline_i][:event].nil?
					- availability_in_timeline = timeline[timeline_i][:by_member][member][:availability]
					- lineup_entry_in_timeline = timeline[timeline_i][:by_member][member][:event_lineup_entry]
					.Panel-cell.u-padXs class="availability-status-code-#{availability_in_timeline.status_code}"
						small style="font-size:10px;" #{lineup_entry_in_timeline.nil? ? "": lineup_entry_in_timeline.label}