<?php

declare(strict_types=1);

namespace App\Enums;

use Filament\Support\Contracts\HasLabel;

enum ImportType: string implements HasLabel
{
    case Employees = 'employees';
    case Vacations = 'vacations';
    case Bonuses = 'bonuses';
    case Reports = 'reports';

    public function getLabel(): string
    {
        return match ($this) {
            self::Employees => __('enums.import_type.employees'),
            self::Vacations => __('enums.import_type.vacations'),
            self::Bonuses => __('enums.import_type.bonuses'),
            self::Reports => __('enums.import_type.reports'),
        };
    }

    public function label(): string
    {
        return $this->getLabel();
    }

    /**
     * @return array<string, string>
     */
    public function fields(): array
    {
        return match ($this) {
            self::Employees => [
                'employee_number' => __('hr.fields.employee_number'),
                'full_name' => __('hr.fields.full_name'),
                'national_id' => __('hr.fields.national_id'),
                'gender' => __('hr.fields.gender'),
                'birth_date' => __('hr.fields.birth_date'),
                'phone' => __('hr.fields.phone'),
                'address' => __('hr.fields.address'),
                'department' => __('hr.fields.department'),
                'position' => __('hr.fields.position'),
                'shift' => __('hr.fields.shift'),
                'employment_status' => __('hr.fields.employment_status'),
                'hire_date' => __('hr.fields.hire_date'),
                'notes' => __('hr.fields.notes'),
            ],
            self::Vacations => [
                'employee_number' => __('hr.fields.employee_number'),
                'type' => __('hr.fields.type'),
                'start_date' => __('hr.fields.start_date'),
                'end_date' => __('hr.fields.end_date'),
                'return_date' => __('hr.fields.return_date'),
                'days' => __('hr.fields.days'),
                'status' => __('hr.fields.status'),
                'reason' => __('hr.fields.reason'),
            ],
            self::Bonuses => [
                'employee_number' => __('hr.fields.employee_number'),
                'bonus_date' => __('hr.fields.bonus_date'),
                'bonus_type' => __('hr.fields.bonus_type'),
                'amount' => __('hr.fields.amount'),
                'reason' => __('hr.fields.reason'),
            ],
            self::Reports => [
                'employee_number' => __('hr.fields.employee_number'),
                'report_date' => __('hr.fields.report_date'),
                'title' => __('hr.fields.title'),
                'description' => __('hr.fields.description'),
                'severity' => __('hr.fields.severity'),
            ],
        };
    }
}
