<?php

namespace App\Listeners;

use App\Modules\SalesChannels\Phyron;

class AddPhyronDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private readonly Phyron $phyron)
    {
        //
    }

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