<?php

declare(strict_types=1);

namespace App\Enums;

enum ContributionType: string
{
    case INITIAL = 'initial';
    case ADDITIONAL = 'additional';
    case REINVESTMENT = 'reinvestment';

    public function getLabel(): string
    {
        return match ($this) {
            self::INITIAL => 'Aporte inicial',
            self::ADDITIONAL => 'Aporte adicional',
            self::REINVESTMENT => 'Reinversion de utilidades',
        };
    }

    public function getColor(): string
    {
        return match ($this) {
            self::INITIAL => 'success',
            self::ADDITIONAL => 'primary',
            self::REINVESTMENT => 'info',
        };
    }

    public function getIcon(): string
    {
        return match ($this) {
            self::INITIAL => 'heroicon-o-plus-circle',
            self::ADDITIONAL => 'heroicon-o-arrow-up-circle',
            self::REINVESTMENT => 'heroicon-o-arrow-path',
        };
    }

    public function affectsCapital(): bool
    {
        return true;
    }
}
