<?php

namespace App\Modules\HR\Recruitment\Support;

final class RecruitmentReportType
{
    public const FUNNEL = 'funnel';

    public const OPEN_VACANCIES = 'open_vacancies';

    public const CANDIDATE_PIPELINE = 'candidate_pipeline';

    public const APPLICATIONS_BY_STATUS = 'applications_by_status';

    public const INTERVIEW_RESULTS = 'interview_results';

    public const OFFER_ACCEPTANCE = 'offer_acceptance';

    public const HIRING = 'hiring';

    public const TIME_TO_HIRE = 'time_to_hire';

    public const SOURCE_ANALYSIS = 'source_analysis';

    /** @return list<string> */
    public static function all(): array
    {
        return [
            self::FUNNEL,
            self::OPEN_VACANCIES,
            self::CANDIDATE_PIPELINE,
            self::APPLICATIONS_BY_STATUS,
            self::INTERVIEW_RESULTS,
            self::OFFER_ACCEPTANCE,
            self::HIRING,
            self::TIME_TO_HIRE,
            self::SOURCE_ANALYSIS,
        ];
    }

    public static function isValid(string $type): bool
    {
        return in_array($type, self::all(), true);
    }
}
