package at.procon.eventhub.tachographfilesession.service;

import at.procon.eventhub.dto.EventHubEventDto;
import at.procon.eventhub.tachographfilesession.model.DriverExtractionSession;
import at.procon.eventhub.tachographfilesession.model.ResolvedDriverTimeline;
import at.procon.eventhub.tachographfilesession.model.TachographFileSession;
import at.procon.eventhub.tachographfilesession.model.TachographTimelineEventBundle;
import java.util.List;

public interface DriverTimelineEventBuilder {

    TachographTimelineEventBundle buildEventBundle(
            TachographFileSession session,
            DriverExtractionSession driverSession
    );

    TachographTimelineEventBundle buildEventBundle(
            TachographFileSession session,
            DriverExtractionSession driverSession,
            ResolvedDriverTimeline timeline
    );

    default List<EventHubEventDto> buildEvents(
            TachographFileSession session,
            DriverExtractionSession driverSession
    ) {
        return buildEventBundle(session, driverSession).allEvents();
    }

    default List<EventHubEventDto> buildEvents(
            TachographFileSession session,
            DriverExtractionSession driverSession,
            ResolvedDriverTimeline timeline
    ) {
        return buildEventBundle(session, driverSession, timeline).allEvents();
    }
}
