from trends.trends.activity import (
    compute_activity_distribution,
    compute_peak_hours,
    compute_weekly_rhythm,
)
from trends.trends.concurrent import (
    compute_concurrent_listening,
    compute_concurrent_media_listening,
)
from trends.trends.fasting import compute_fasting
from trends.trends.mood import (
    compute_mood_by_time,
    compute_mood_distribution,
    compute_mood_streaks,
    compute_mood_trajectory,
    compute_mood_weather,
)
from trends.trends.reading import compute_reading_pace_vs_activity
from trends.trends.time_of_day import compute_time_of_day_categories
from trends.trends.trending import compute_trending_up

TREND_REGISTRY = {}


def register(slug):
    def decorator(fn):
        TREND_REGISTRY[slug] = fn
        return fn

    return decorator


compute_activity_distribution = register("activity-distribution")(
    compute_activity_distribution
)
# compute_concurrent_listening = register("concurrent-listening")(
#    compute_concurrent_listening
# )
compute_concurrent_media_listening = register("concurrent-media-listening")(
    compute_concurrent_media_listening
)
compute_mood_by_time = register("mood-by-time")(compute_mood_by_time)
compute_mood_distribution = register("mood-distribution")(compute_mood_distribution)
compute_mood_streaks = register("mood-streaks")(compute_mood_streaks)
compute_mood_trajectory = register("mood-trajectory")(compute_mood_trajectory)
compute_mood_weather = register("mood-weather")(compute_mood_weather)
compute_peak_hours = register("peak-hours")(compute_peak_hours)
compute_reading_pace_vs_activity = register("reading-pace-vs-activity")(
    compute_reading_pace_vs_activity
)
compute_time_of_day_categories = register("time-of-day-categories")(
    compute_time_of_day_categories
)
compute_trending_up = register("trending-up")(compute_trending_up)
compute_weekly_rhythm = register("weekly-rhythm")(compute_weekly_rhythm)
compute_fasting = register("fasting")(compute_fasting)
