<?php

namespace App\Modules\HR\Organization\Services;

use App\Modules\HR\Organization\Repositories\BranchRepository;
use App\Modules\HR\Organization\Repositories\CostCenterRepository;
use App\Modules\HR\Organization\Repositories\JobGradeRepository;
use App\Modules\HR\Organization\Repositories\SectionRepository;
use App\Modules\HR\Organization\Repositories\TeamRepository;
use App\Modules\HR\Organization\Repositories\WorkLocationRepository;

class OrganizationFormOptionsService
{
    public function __construct(
        private readonly BranchRepository $branches,
        private readonly SectionRepository $sections,
        private readonly TeamRepository $teams,
        private readonly JobGradeRepository $jobGrades,
        private readonly WorkLocationRepository $workLocations,
        private readonly CostCenterRepository $costCenters,
    ) {}

    /** @return array<string, array<int, string>> */
    public function employeeOptions(): array
    {
        return [
            'branchOptions' => $this->branches->listForSelect(),
            'sectionOptions' => $this->sections->listForSelect(),
            'teamOptions' => $this->teams->listForSelect(),
            'jobGradeOptions' => $this->jobGrades->listForSelect(),
            'workLocationOptions' => $this->workLocations->listForSelect(),
            'costCenterOptions' => $this->costCenters->listForSelect(),
        ];
    }
}
