<?php

namespace App\Listeners;

use App\Modules\Stock\Skoda;

class AddSkodaDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private Skoda $skoda)
    {
        //
    }

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