<?php
namespace Claromentis\Quiz\Subscriber;

$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] = (@$GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"] ?: array()) + array("_7adc269a" . "13af5c45b" . "5a1caf4ec" . "75a795" => base64_decode("YXR0ZW" . "1wdA=="), "_5875b4eba" . "a48fb99268" . "38cd967f94" . "4c1" => base64_decode("T25TdXJ2ZXlDb21wbG" . "V0ZQ=="), "_2f1a6ac51683c9c2437d9634" . "e9096f39" => base64_decode("T25Qb2x" . "sQ29tcG" . "xldGU="), "surve" . "y" => base64_decode("c3Vydm" . "V5"), "_866f760e8" . "2b1e27b792" . "2b4bc24d7c" . "497" => base64_decode("c3VydmV5Lm9uX2Nvb" . "XBsZXRl"), "_28b4968d" . "283c76aab" . "e07eb44d4" . "cd2c3e" => base64_decode("cG9sbC5vbl9jb2" . "1wbGV0ZQ=="), "_b3ee1ca1d7e4bff63ae7779684" . "83325d" => base64_decode("cG9" . "sbA" . "=="));
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["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["_866f760e82b1e27b7922b4bc2" . "4d7c497"] => $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_5875b4ebaa48fb" . "9926838cd967f94" . "4c1"], $GLOBALS["__65da1b1ec2d6653e8a0" . "ab7848e536215"]["_28b4968d283c" . "76aabe07eb44d" . "4cd2c3e"] => $GLOBALS["__65da1b1ec2d6653e8a0ab7848e5362" . "15"]["_2f1a6ac51683c9c2437" . "d9634e9096f39"]];
    }
    public function OnSurveyComplete(GenericEvent $_e62ca7bbb93b52cafc82da1c2aefe9ec)
    {
        
        
        $survey = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a0ab7848e53621" . "5"]["su" . "rv" . "ey"]];
        
        
        $_7adc269a13af5c45b5a1caf4ec75a795 = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a0ab7" . "848e536215"]["_7adc269a13af" . "5c45b5a1caf4e" . "c75a795"]];
        if (!$survey->notify_on_submit) {
            return;
        }
        $this->notification->SendSurveyCompletedNotification($survey, $_7adc269a13af5c45b5a1caf4ec75a795);
    }
    public function OnPollComplete(GenericEvent $_e62ca7bbb93b52cafc82da1c2aefe9ec)
    {
        
        
        $_b3ee1ca1d7e4bff63ae777968483325d = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d66" . "53e8a0ab7848e53" . "6215"]["_b3ee1ca1d7e4bff6" . "3ae777968483325d"]];
        
        
        $_7adc269a13af5c45b5a1caf4ec75a795 = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a0ab" . "7848e536215"]["_7adc269a13af5" . "c45b5a1caf4ec7" . "5a795"]];
        if (!$_b3ee1ca1d7e4bff63ae777968483325d->notify_on_submit) {
            return;
        }
        $this->notification->SendPollCompletedNotification($_b3ee1ca1d7e4bff63ae777968483325d, $_7adc269a13af5c45b5a1caf4ec75a795);
    }
}