<?php

namespace Kargnas\LaravelAiTranslator;

use Kargnas\LaravelAiTranslator\Console\CleanCommand;
use Kargnas\LaravelAiTranslator\Console\FindUnusedTranslations;
use Kargnas\LaravelAiTranslator\Console\TestTranslateCommand;
use Kargnas\LaravelAiTranslator\Console\TranslateCrowdin;
use Kargnas\LaravelAiTranslator\Console\TranslateCrowdinParallel;
use Kargnas\LaravelAiTranslator\Console\TranslateFileCommand;
use Kargnas\LaravelAiTranslator\Console\TranslateJson;
use Kargnas\LaravelAiTranslator\Console\TranslateStrings;
use Kargnas\LaravelAiTranslator\Console\TranslateStringsParallel;

class ServiceProvider extends \Illuminate\Support\ServiceProvider
{
    public function boot(): void
    {
        $this->publishes([
            __DIR__.'/../config/ai-translator.php' => config_path('ai-translator.php'),
        ]);
    }

    public function register(): void
    {
        $this->mergeConfigFrom(
            __DIR__.'/../config/ai-translator.php',
            'ai-translator',
        );

        $this->commands([
            CleanCommand::class,
            FindUnusedTranslations::class,
            TranslateStrings::class,
            TranslateStringsParallel::class,
            TranslateCrowdinParallel::class,
            TranslateCrowdin::class,
            TestTranslateCommand::class,
            TranslateFileCommand::class,
            TranslateJson::class,
        ]);
    }
}
