<?php

namespace App\Http\Controllers\Api;

use App\Http\Controllers\Controller;
use App\Models\Development;
use App\Service\DeepLService;
use App\Supports\Response;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;

/**
 * @group Lottery Prize
 */
class DeeplTranslateController extends Controller
{
    public function __construct() {

    }
    public function insert(Request $request){
        $glossaryName = $request->name;
        $glossaryLocaleFrom = $request->localeFrom;
        $glossaryLocaleTo = $request->localeTo;
        $glossaryItems = $request->localeItems;
        $deeplService = new DeepLService();
        return $deeplService->buildGlossary($glossaryName, $glossaryLocaleFrom, $glossaryLocaleTo, $glossaryItems);
    }

    public function list()
    {
        $deeplService = new DeepLService();
        return $deeplService->listGlossary();
    }

    public function delete()
    {
        $deeplService = new DeepLService();
        return $deeplService->deleteGlossary();
    }
}
