<?php

namespace Config;

use App\Services\AcademyCatalogService;
use App\Services\AlertService;
use App\Services\AttendanceService;
use App\Services\AuthorizationService;
use App\Services\ChildrenService;
use App\Services\CoachesService;
use App\Services\DashboardService;
use App\Services\EvaluationsService;
use App\Services\EvaluationEngineService;
use App\Services\JourneyService;
use App\Services\ReportService;
use CodeIgniter\Config\BaseService;

/**
 * Services Configuration file.
 *
 * Services are simply other classes/libraries that the system uses
 * to do its job. This is used by CodeIgniter to allow the core of the
 * framework to be swapped out easily without affecting the usage within
 * the rest of your application.
 *
 * This file holds any application-specific services, or service overrides
 * that you might need. An example has been included with the general
 * method format you should use for your service methods. For more examples,
 * see the core Services file at system/Config/Services.php.
 */
class Services extends BaseService
{
    public static function academyCatalog(bool $getShared = true): AcademyCatalogService
    {
        if ($getShared) {
            return static::getSharedInstance('academyCatalog');
        }

        return new AcademyCatalogService();
    }

    public static function alerts(bool $getShared = true): AlertService
    {
        if ($getShared) {
            return static::getSharedInstance('alerts');
        }

        return new AlertService();
    }

    public static function attendance(bool $getShared = true): AttendanceService
    {
        if ($getShared) {
            return static::getSharedInstance('attendance');
        }

        return new AttendanceService();
    }

    public static function authorization(bool $getShared = true): AuthorizationService
    {
        if ($getShared) {
            return static::getSharedInstance('authorization');
        }

        return new AuthorizationService();
    }

    public static function children(bool $getShared = true): ChildrenService
    {
        if ($getShared) {
            return static::getSharedInstance('children');
        }

        return new ChildrenService();
    }

    public static function coaches(bool $getShared = true): CoachesService
    {
        if ($getShared) {
            return static::getSharedInstance('coaches');
        }

        return new CoachesService();
    }

    public static function dashboard(bool $getShared = true): DashboardService
    {
        if ($getShared) {
            return static::getSharedInstance('dashboard');
        }

        return new DashboardService();
    }

    public static function evaluations(bool $getShared = true): EvaluationsService
    {
        if ($getShared) {
            return static::getSharedInstance('evaluations');
        }

        return new EvaluationsService();
    }

    public static function evaluationEngine(bool $getShared = true): EvaluationEngineService
    {
        if ($getShared) {
            return static::getSharedInstance('evaluationEngine');
        }

        return new EvaluationEngineService();
    }

    public static function journey(bool $getShared = true): JourneyService
    {
        if ($getShared) {
            return static::getSharedInstance('journey');
        }

        return new JourneyService();
    }

    public static function reports(bool $getShared = true): ReportService
    {
        if ($getShared) {
            return static::getSharedInstance('reports');
        }

        return new ReportService();
    }
}
