<?php

namespace App\Providers;

use App\Contracts\ResumeAnalyzer;
use App\Contracts\ResumeTextExtractor;
use App\Models\ImportedJob;
use App\Policies\ImportedJobPolicy;
use App\Services\Resume\LocalResumeTextExtractor;
use App\Services\Resume\OpenAiResumeAnalyzer;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\ServiceProvider;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     */
    public function register(): void
    {
        $this->app->bind(ResumeAnalyzer::class, OpenAiResumeAnalyzer::class);
        $this->app->bind(ResumeTextExtractor::class, LocalResumeTextExtractor::class);
    }

    /**
     * Bootstrap any application services.
     */
    public function boot(): void
    {
        Gate::policy(ImportedJob::class, ImportedJobPolicy::class);
    }
}
