<?php

namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use App\Services\AiSalesService;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        $this->app->singleton(AiSalesService::class, function () {
            return new AiSalesService(
                baseUrl: rtrim(env('LITELLM_BASE_URL', ''), '/'),
                apiKey: env('LITELLM_API_KEY', ''),
                model: env('LITELLM_MODEL', 'gpt-4o-mini'),
            );
        });
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        // BIARKAN KOSONG kalau sebelumnya memang kosong.
        // Kalau kamu punya isi boot sebelumnya, taruh balik di sini.
    }
}