<?php
namespace Claromentis\Quiz\Subscriber;

$GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_5875b4ebaa48fb9" . "926838cd967f944c" . "1" => base64_decode("T25TdXJ2ZX" . "lDb21wbGV0" . "ZQ=="), "_7adc269a13af5c4" . "5b5a1caf4ec75a79" . "5" => base64_decode("YXR0ZW" . "1wdA=="), "_866f760e82" . "b1e27b7922b" . "4bc24d7c497" => base64_decode("c3VydmV5" . "Lm9uX2Nv" . "bXBsZXRl"), "_b3ee1ca1d7e" . "4bff63ae7779" . "68483325d" => base64_decode("cG9sb" . "A=="), "surve" . "y" => base64_decode("c3V" . "ydm" . "V5"), "_28b4968d283c76aabe07eb44d4c" . "d2c3e" => base64_decode("cG9sbC" . "5vbl9j" . "b21wbG" . "V0ZQ=="), "_2f1a6ac51683c9c243" . "7d9634e9096f39" => base64_decode("T25Qb2xsQ29tcGxl" . "dGU="));
use Claromentis\Core\Event\GenericEvent;
use Claromentis\Quiz\Facade\AttemptFacade;
use Claromentis\Quiz\Legacy\NotificationSender;
use Claromentis\Quiz\Model\Attempt;
use Claromentis\Quiz\Model\Poll;
use Claromentis\Quiz\Model\Survey;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;





class NotificationSubscriber implements EventSubscriberInterface
{
    
    
    
    
    protected $attempt_facade;
    
    
    
    
    private $notification;
    
    
    
    
    
    
    
    public function __construct(NotificationSender $_99aaa03a11622e16e59bff0771ea8ef3, AttemptFacade $attempt_facade)
    {
        $this->notification = $_99aaa03a11622e16e59bff0771ea8ef3;
        $this->attempt_facade = $attempt_facade;
    }
    
    
    
    
    public static function getSubscribedEvents()
    {
        return [$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_866f760e82b1e27b" . "7922b4bc24d7c497"] => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e" . "536215"]["_5875b4ebaa" . "48fb9926838" . "cd967f944c1"], $GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"]["_28b4968" . "d283c76a" . "abe07eb4" . "4d4cd2c3" . "e"] => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_2f1a6ac51683c9c" . "2437d9634e9096f3" . "9"]];
    }
    public function OnSurveyComplete(GenericEvent $_e62ca7bbb93b52cafc82da1c2aefe9ec)
    {
        
        
        $survey = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec" . "2d6653e8a0a" . "b7848e53621" . "5"]["surve" . "y"]];
        
        
        $_7adc269a13af5c45b5a1caf4ec75a795 = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_7adc269a13af5c45b5a1caf4ec75a79" . "5"]];
        if (!$survey->notify_on_submit) {
            return;
        }
        $this->notification->SendSurveyCompletedNotification($survey, $_7adc269a13af5c45b5a1caf4ec75a795);
    }
    public function OnPollComplete(GenericEvent $_e62ca7bbb93b52cafc82da1c2aefe9ec)
    {
        
        
        $_b3ee1ca1d7e4bff63ae777968483325d = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_b3ee1ca1d7e4bff63ae777968" . "483325d"]];
        
        
        $_7adc269a13af5c45b5a1caf4ec75a795 = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53" . "6215"]["_7adc269a13af5c45b5a" . "1caf4ec75a795"]];
        if (!$_b3ee1ca1d7e4bff63ae777968483325d->notify_on_submit) {
            return;
        }
        $this->notification->SendPollCompletedNotification($_b3ee1ca1d7e4bff63ae777968483325d, $_7adc269a13af5c45b5a1caf4ec75a795);
    }
}