<?php

namespace App\Modules\Office365;

use App\Modules\Office365\Services\Office365AuthService;
use App\Modules\Office365\Services\Office365CalendarService;
use App\Modules\Office365\Services\Office365ServiceInterface;

class Office365ServiceProvider extends \App\Modules\ServiceProvider
{
    public function register()
    {
        parent::register('office365');

        // Register Office365 services as singletons
        $this->app->singleton(Office365AuthService::class);
        $this->app->singleton(Office365CalendarService::class);
        
        // Bind interface to implementation
        $this->app->singleton(Office365ServiceInterface::class, Office365CalendarService::class);
        
        // Register alias for convenience
        $this->app->alias(Office365ServiceInterface::class, 'office365');
    }

    public function boot()
    {
        parent::boot('office365');
    }
}