<?php

namespace App\Listeners;

use App\Services\Violation\ViolationAbstract;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;

class AuditMediaDeal implements ShouldQueue
{
    use InteractsWithQueue;

    /**
     * Create the event listener.
     *
     * @return void
     */
    public function __construct()
    {
    }

    /**
     * Handle the event.
     *
     * @param  \App\Events\AuditMediaDeal  $event
     * @return void
     */
    public function handle($event)
    {
        $media = $event->media;

        $violation = ViolationAbstract::make($media);
        $violation->handle();
    }
}
