<?php

namespace App\Listeners;

use App\Modules\SalesChannels\CarWow;

class AddCarWowDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private CarWow $carWow)
    {
        //
    }

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