<?php

namespace App\Enums;

enum BrokerageAccountType: string
{
    case Retirement = 'retirement';
    case TraditionalIRA = 'traditional_ira';
    case RothIRA = 'roth_ira';
    case FourOhOneK = '401k';

    public function label(): string
    {
        return match ($this) {
            self::Retirement => 'Retirement Account',
            self::TraditionalIRA => 'Traditional IRA',
            self::RothIRA => 'Roth IRA',
            self::FourOhOneK => '401(k)',
        };
    }

    public function description(): string
    {
        return match ($this) {
            self::Retirement => 'A general retirement investment account for long-term savings and wealth building.',
            self::TraditionalIRA => 'Tax-deductible contributions now, taxed upon withdrawal in retirement. Annual limit: $7,000 ($8,000 if age 50+).',
            self::RothIRA => 'After-tax contributions now, tax-free withdrawals in retirement. Annual limit: $7,000 ($8,000 if age 50+).',
            self::FourOhOneK => 'Employer-sponsored retirement plan with pre-tax contributions. Annual limit: $23,000 ($30,500 if age 50+).',
        };
    }

    public function annualLimit(): string
    {
        return match ($this) {
            self::Retirement => 'No statutory limit',
            self::TraditionalIRA => '$7,000 / $8,000 (50+)',
            self::RothIRA => '$7,000 / $8,000 (50+)',
            self::FourOhOneK => '$23,000 / $30,500 (50+)',
        };
    }
}
