<?php

namespace App\Enums;

enum ForumVisibility: string
{
    case All = 'all';  // Visible to every member on the platform
    case Hub = 'hub';  // Visible only to members of the same hub

    public function label(): string
    {
        return match($this) {
            ForumVisibility::All => 'All Members',
            ForumVisibility::Hub => 'Hub Members Only',
        };
    }

    public function labelAr(): string
    {
        return match($this) {
            ForumVisibility::All => 'جميع الأعضاء',
            ForumVisibility::Hub => 'أعضاء المجموعة فقط',
        };
    }

    public static function values(): array
    {
        return array_column(self::cases(), 'value');
    }
}
