<?php

declare(strict_types=1);

namespace App\Application\LiveComponents\ValueObjects;

/**
 * ActivityDateGroup - Date grouping for activities
 */
enum ActivityDateGroup: string
{
    case TODAY = 'today';
    case YESTERDAY = 'yesterday';
    case THIS_WEEK = 'this_week';
    case OLDER = 'older';

    public function getLabel(): string
    {
        return match ($this) {
            self::TODAY => 'Heute',
            self::YESTERDAY => 'Gestern',
            self::THIS_WEEK => 'Diese Woche',
            self::OLDER => 'Älter'
        };
    }

    public function getSortOrder(): int
    {
        return match ($this) {
            self::TODAY => 1,
            self::YESTERDAY => 2,
            self::THIS_WEEK => 3,
            self::OLDER => 4
        };
    }
}
