<?php

declare(strict_types=1);

namespace App\Providers;

use App\Services\PaynlService;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Support\ServiceProvider;
use IntVent\EBoekhouden\Client;

class AppServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        $this->app->bind(PaynlService::class, function (Application $app) {
            return new PaynlService(
                config('services.paynl.token_code'),
                config('services.paynl.api_token')
            );
        });

        $this->app->bind(Client::class, function (Application $app) {
            return new Client(
                config('services.eboekhouden.username'),
                config('services.eboekhouden.security_code_1'),
                config('services.eboekhouden.security_code_2'),
            );
        });
    }

    public function boot(): void
    {
        //
    }
}
