<?php

namespace App\Listeners;

use App\Modules\SalesChannels\EbayMotors;

class AddEbayMotorsDealershipFields
{
    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct(private readonly EbayMotors $ebayMotors)
    {
        //
    }

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