<?php

namespace App\Providers;

use App\Services\Billing\BillingManager;
use App\Services\Billing\Providers\PaypalProvider;
use App\Services\Billing\Providers\RazorpayProvider;
use App\Services\Billing\Providers\StripeProvider;
use Illuminate\Support\ServiceProvider;

class BillingServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->singleton(BillingManager::class, function ($app) {
            $manager = new BillingManager($app);
            $manager->register('stripe', StripeProvider::class);
            $manager->register('razorpay', RazorpayProvider::class);
            $manager->register('paypal', PaypalProvider::class);

            return $manager;
        });
    }
}
