<?php

namespace App\Listeners;

use App\Modules\Stock\Skupenet;

class AddSkupenetDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private readonly Skupenet $skupenet)
    {
        //
    }

    /**
     * Handle the event.
     *
     * @param  object  $event
     * @return array
     */
    public function handle($event)
    {
        if ($this->skupenet->enabled() == false) {
            return [];
        }
        return $this->skupenet->dealershipAdditionalDataFields();
    }
}
