<?php

namespace App\Listeners;

use App\Modules\SalesChannels\ChannelFeed;

class AddChannelDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private ChannelFeed $channelFeed)
    {
        //
    }

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