<?php

namespace App\Enums;

enum LeadStage: string
{
    case NewLead = 'new_lead';
    case Qualified = 'qualified';
    case DiscoveryScheduled = 'discovery_scheduled';
    case DiscoveryCompleted = 'discovery_completed';
    case ProposalDrafting = 'proposal_drafting';
    case InternalReview = 'internal_review';
    case SharedWithClient = 'shared_with_client';
    case RevisionRequested = 'revision_requested';
    case ApprovedSigned = 'approved_signed';
    case PaymentPending = 'payment_pending';
    case ActiveProject = 'active_project';
    case Completed = 'completed';
    case LostArchived = 'lost_archived';

    public static function options(): array
    {
        return array_map(
            fn (self $stage): array => ['value' => $stage->value, 'label' => str($stage->value)->replace('_', ' ')->title()->toString()],
            self::cases()
        );
    }
}
