<?php

namespace App\Enums;

enum ProfessionalRole: string
{
    case GASTROENTEROLOGIST = 'gastroenterologist';
    case ENDOSCOPIC_SURGEON = 'endoscopic_surgeon';
    case FELLOW_RESIDENT = 'fellow_resident';
    case ENDOSCOPY_NURSE = 'endoscopy_nurse';
    case MEDICAL_STUDENT = 'medical_student';
    case INDUSTRY_PROFESSIONAL = 'industry_professional';
    case OTHER_HEALTHCARE_PROFESSIONAL = 'other_healthcare_professional';
    case OTHER = 'other';

    public function label(): string
    {
        return match ($this) {
            self::GASTROENTEROLOGIST => 'Gastroenterologist',
            self::ENDOSCOPIC_SURGEON => 'Endoscopic Surgeon',
            self::FELLOW_RESIDENT => 'Fellow / Resident',
            self::ENDOSCOPY_NURSE => 'Endoscopy nurse',
            self::MEDICAL_STUDENT => 'Medical student',
            self::INDUSTRY_PROFESSIONAL => 'Industry professional',
            self::OTHER_HEALTHCARE_PROFESSIONAL => 'Other healthcare professional',
            self::OTHER => 'Other',
        };
    }

    public static function options(): array
    {
        return [
            self::GASTROENTEROLOGIST->value => 'Gastroenterologist',
            self::ENDOSCOPIC_SURGEON->value => 'Endoscopic Surgeon',
            self::FELLOW_RESIDENT->value => 'Fellow / Resident',
            self::ENDOSCOPY_NURSE->value => 'Endoscopy nurse',
            self::MEDICAL_STUDENT->value => 'Medical student',
            self::INDUSTRY_PROFESSIONAL->value => 'Industry professional',
            self::OTHER_HEALTHCARE_PROFESSIONAL->value => 'Other healthcare professional',
            self::OTHER->value => 'Other',
        ];
    }
}
