class HubEventLogger {

    public void logIdpSelectedEvent(IdpSelectedState idpSelectedState, String principalIpAddress, String analyticsSessionId, String journeyType, String abTestVariant) {
        List<LevelOfAssurance> levelsOfAssurance = idpSelectedState.getLevelsOfAssurance();
        Map<EventDetailsKey, String> details = new HashMap<>();
        details.put(idp_entity_id, idpSelectedState.getIdpEntityId());
        details.put(principal_ip_address_as_seen_by_hub, principalIpAddress);
        details.put(minimum_level_of_assurance, Collections.min(levelsOfAssurance).name());
        details.put(maximum_level_of_assurance, Collections.max(levelsOfAssurance).name());
        details.put(preferred_level_of_assurance, levelsOfAssurance.get(0).name());
        details.put(analytics_session_id, analyticsSessionId);
        details.put(journey_type, journeyType);
        details.put(ab_test_variant, abTestVariant);

        logSessionEvent(
            idpSelectedState.getSessionId(),
            idpSelectedState.getRequestIssuerEntityId(),
            idpSelectedState.getSessionExpiryTimestamp(),
            idpSelectedState.getRequestId(),
            IDP_SELECTED,
            details);
    }

    @Inject public  HubEventLogger(ServiceInfoConfiguration serviceInfo,
                          EventSinkProxy eventSinkProxy,
                          EventEmitter eventEmitter);

}