<?php

namespace App\Enums;

use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;

enum ReportReason: string implements HasColor, HasLabel
{
    case SPAM = 'spam';
    case HARASSMENT = 'harassment';
    case HATE_SPEECH = 'hate_speech';
    case INAPPROPRIATE = 'inappropriate';
    case DANGEROUS_CONTENT = 'dangerous_content';
    case MISLEADING = 'misleading';
    case OTHER = 'other';

    public function getLabel(): string
    {
        return match ($this) {
            self::SPAM => __('enums.report_reason.spam'),
            self::HARASSMENT => __('enums.report_reason.harassment'),
            self::HATE_SPEECH => __('enums.report_reason.hate_speech'),
            self::INAPPROPRIATE => __('enums.report_reason.inappropriate'),
            self::DANGEROUS_CONTENT => __('enums.report_reason.dangerous_content'),
            self::MISLEADING => __('enums.report_reason.misleading'),
            self::OTHER => __('enums.report_reason.other'),
        };
    }

    public function getColor(): string
    {
        return match ($this) {
            self::HATE_SPEECH, self::DANGEROUS_CONTENT => 'danger',
            self::HARASSMENT, self::INAPPROPRIATE => 'warning',
            self::SPAM, self::MISLEADING => 'info',
            self::OTHER => 'gray',
        };
    }
}
