<?php

namespace App\Modules\Xero;

use App\Modules\Xero\Services\XeroService;
use App\Modules\Xero\Services\XeroServiceInterface;
use App\Modules\Xero\Services\XeroAuthService;

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

        // Bind Xero service interface to implementation as singleton (stateless service)
        $this->app->singleton(XeroServiceInterface::class, XeroService::class);

        // Register XeroAuthService as singleton (no dependencies needed)
        $this->app->singleton(XeroAuthService::class);

        // Optional: Register alias for convenience
        $this->app->alias(XeroServiceInterface::class, 'xero');
    }

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