<?php

declare(strict_types=1);

namespace App\Enums;

enum ProfitDistributionStatus: string
{
    case DRAFT = 'draft';
    case APPROVED = 'approved';
    case DISTRIBUTED = 'distributed';
    case CANCELLED = 'cancelled';

    public function getLabel(): string
    {
        return match ($this) {
            self::DRAFT => 'Borrador',
            self::APPROVED => 'Aprobada',
            self::DISTRIBUTED => 'Distribuida',
            self::CANCELLED => 'Cancelada',
        };
    }

    public function getColor(): string
    {
        return match ($this) {
            self::DRAFT => 'gray',
            self::APPROVED => 'info',
            self::DISTRIBUTED => 'success',
            self::CANCELLED => 'danger',
        };
    }

    public function getIcon(): string
    {
        return match ($this) {
            self::DRAFT => 'heroicon-o-pencil-square',
            self::APPROVED => 'heroicon-o-check-circle',
            self::DISTRIBUTED => 'heroicon-o-banknotes',
            self::CANCELLED => 'heroicon-o-x-circle',
        };
    }
}
