<?php

declare(strict_types=1);

namespace App\Providers;

use App\Http\Controllers\API\V1\Informacia\Frontend\InformaciaTransformer;
use App\Http\Controllers\API\V1\Informacia\Frontend\SumarHodnoteniaDtoTransformer;
use App\Http\Controllers\API\V1\Informacia\Frontend\SumarHodnoteniDto;
use App\Http\Controllers\API\V1\Pouzivatel\Notifications\Transformers\NotificationTransformer;
use App\Models\Informacia\Informacia;
use Dingo\Api\Transformer\Factory;
use Illuminate\Notifications\DatabaseNotification;
use Illuminate\Support\ServiceProvider;

/**
 * Class ApiServiceProvider
 */
final class ApiServiceProvider extends ServiceProvider
{
    public function register(): void
    {
        app(Factory::class)->register(
            DatabaseNotification::class,
            NotificationTransformer::class,
            ['key' => 'notifikacia'],
        );
        app(Factory::class)->register(
            Informacia::class,
            InformaciaTransformer::class,
            ['key' => 'informacia'],
        );
        app(Factory::class)->register(
            SumarHodnoteniDto::class,
            SumarHodnoteniaDtoTransformer::class,
            ['key' => 'hodnotenie'],
        );
    }
}
