services:
    _defaults:
        autowire: true
        autoconfigure: true

    ## Indicators
    Chill\ActivityBundle\Export\Export\LinkedToPerson\CountActivity:
        tags:
            - { name: chill.export, alias: 'count_activity_linked_to_person' }

    Chill\ActivityBundle\Export\Export\LinkedToPerson\StatActivityDuration:
        tags:
            - { name: chill.export, alias: 'sum_activity_duration_linked_to_person' }

    Chill\ActivityBundle\Export\Export\LinkedToPerson\ListActivity:
        tags:
            - { name: chill.export, alias: 'list_activity_linked_to_person' }

    Chill\ActivityBundle\Export\Export\LinkedToACP\CountPersonsOnActivity:
        tags:
            - { name: chill.export, alias: 'count_person_on_activity' }

    Chill\ActivityBundle\Export\Export\LinkedToACP\CountHouseholdOnActivity:
        tags:
            - { name: chill.export, alias: 'count_household_on_activity_acp' }

    Chill\ActivityBundle\Export\Export\LinkedToPerson\CountHouseholdOnActivity:
        tags:
            - { name: chill.export, alias: 'count_household_on_activity_person' }

    chill.activity.export.count_activity_linked_to_acp:
        class: Chill\ActivityBundle\Export\Export\LinkedToACP\CountActivity
        tags:
            - { name: chill.export, alias: 'count_activity_linked_to_acp' }

    chill.activity.export.sum_activity_duration_linked_to_acp:
        class: Chill\ActivityBundle\Export\Export\LinkedToACP\SumActivityDuration
        tags:
            - { name: chill.export, alias: 'sum_activity_duration_linked_to_acp' }

    chill.activity.export.sum_activity_visit_duration_linked_to_acp:
        class: Chill\ActivityBundle\Export\Export\LinkedToACP\SumActivityVisitDuration
        tags:
            - { name: chill.export, alias: 'sum_activity_visit_duration_linked_to_acp' }

    chill.activity.export.avg_activity_duration_linked_to_acp:
        class: Chill\ActivityBundle\Export\Export\LinkedToACP\AvgActivityDuration
        tags:
            - { name: chill.export, alias: 'avg_activity_duration_linked_to_acp' }

    chill.activity.export.avg_activity_visit_duration_linked_to_acp:
        class: Chill\ActivityBundle\Export\Export\LinkedToACP\AvgActivityVisitDuration
        tags:
            - { name: chill.export, alias: 'avg_activity_visit_duration_linked_to_acp' }

    Chill\ActivityBundle\Export\Export\LinkedToACP\ListActivity:
        tags:
            - { name: chill.export, alias: 'list_activity_acp'}

    Chill\ActivityBundle\Export\Export\ListActivityHelper: ~

    ## Filters
    chill.activity.export.type_filter:
        class: Chill\ActivityBundle\Export\Filter\ActivityTypeFilter
        tags:
            - { name: chill.export_filter, alias: 'activity_type_filter' }

    Chill\ActivityBundle\Export\Filter\ActivityDateFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_date_filter' }

    Chill\ActivityBundle\Export\Filter\ActivityUsersFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_users_filter' }

    chill.activity.export.reason_filter:
        class: Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter
        tags:
            - { name: chill.export_filter, alias: 'activity_reason_filter' }

    chill.activity.export.person_having_an_activity_between_date_filter:
        class: Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter
        tags:
            - #0 register as a filter
                name: chill.export_filter
                alias: 'activity_person_having_ac_bw_date_filter'

    Chill\ActivityBundle\Export\Filter\ACPFilters\ActivityTypeFilter:
        tags:
            - { name: chill.export_filter, alias: 'accompanyingcourse_activitytype_filter' }

    Chill\ActivityBundle\Export\Filter\LocationFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_location_filter' }

    Chill\ActivityBundle\Export\Filter\LocationTypeFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_locationtype_filter' }

    Chill\ActivityBundle\Export\Filter\ByCreatorFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_bycreator_filter' }

    Chill\ActivityBundle\Export\Filter\EmergencyFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_emergency_filter' }

    Chill\ActivityBundle\Export\Filter\SentReceivedFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_sentreceived_filter' }

    Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialActionFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_bysocialaction_filter' }

    Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialIssueFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_bysocialissue_filter' }

    Chill\ActivityBundle\Export\Filter\UserFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_user_filter' }

    Chill\ActivityBundle\Export\Filter\CreatorScopeFilter:
        tags:
            # WARNING: for backward compatibility reason, the alias is named with userscope. Changing this will
            # affect all saved exports (unless we write a migration for that)
            - { name: chill.export_filter, alias: 'activity_userscope_filter' }

    Chill\ActivityBundle\Export\Filter\CreatorJobFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_creatorjob_filter' }

    Chill\ActivityBundle\Export\Filter\UsersJobFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_usersjob_filter' }

    Chill\ActivityBundle\Export\Filter\UsersScopeFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_usersscope_filter' }

    Chill\ActivityBundle\Export\Filter\ACPFilters\HasNoActivityFilter:
        tags:
            - { name: chill.export_filter, alias: 'accompanyingcourse_has_no_activity_filter' }

    Chill\ActivityBundle\Export\Filter\ACPFilters\PeriodHavingActivityBetweenDatesFilter:
        tags:
            - { name: chill.export_filter, alias: 'period_having_activity_betw_dates_filter' }

    Chill\ActivityBundle\Export\Filter\ActivityPresenceFilter:
        tags:
            - { name: chill.export_filter, alias: 'activity_presence_filter' }


    ## Aggregators
    Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_reason_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ActivityTypeAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_common_type_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ActivityLocationAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_common_location_aggregator }

    chill.activity.export.user_aggregator:
        class: Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator
        tags:
            - { name: chill.export_aggregator, alias: activity_user_aggregator }

    Chill\ActivityBundle\Export\Aggregator\LocationTypeAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_locationtype_aggregator }

    Chill\ActivityBundle\Export\Aggregator\DateAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_date_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ByCreatorAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_by_creator_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ByThirdpartyAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_bythirdparty_aggregator }

    chill.activity.export.bysocialaction_aggregator:
        class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialActionAggregator
        tags:
            - { name: chill.export_aggregator, alias: activity_bysocialaction_aggregator }

    chill.activity.export.bysocialissue_aggregator:
        class: Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialIssueAggregator
        tags:
            - { name: chill.export_aggregator, alias: activity_bysocialissue_aggregator }

    Chill\ActivityBundle\Export\Aggregator\CreatorScopeAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_creator_scope_aggregator }

    Chill\ActivityBundle\Export\Aggregator\CreatorJobAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_creator_job_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ActivityUsersAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_users_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ActivityUsersScopeAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_users_scope_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ActivityUsersJobAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_users_job_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByActivityNumberAggregator:
        tags:
            - { name: chill.export_aggregator, alias: accompanyingcourse_by_activity_number_aggregator }

    Chill\ActivityBundle\Export\Aggregator\SentReceivedAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_sentreceived_aggregator }

    Chill\ActivityBundle\Export\Filter\PersonsFilter:
        tags:
            - { name: chill.export_filter, alias: activity_by_persons_filter }

    Chill\ActivityBundle\Export\Aggregator\PersonsAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_by_persons_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByActivityTypeAggregator:
        tags:
            - { name: chill.export_aggregator, alias: acp_by_activity_type_aggregator }

    Chill\ActivityBundle\Export\Aggregator\ActivityPresenceAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_presence_agg }

    Chill\ActivityBundle\Export\Aggregator\PersonAggregators\PersonAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_person_agg }

    Chill\ActivityBundle\Export\Aggregator\PersonAggregators\HouseholdAggregator:
        tags:
            - { name: chill.export_aggregator, alias: activity_household_agg }
