<?php
namespace Claromentis\Quiz\Subscriber;

$GLOBALS["__65da1b1ec2" . "d6653e8a0ab7" . "848e536215"] = (@$GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"] ?: array()) + array("_866f760e82b1e27b7" . "922b4bc24d7c497" => base64_decode("c3VydmV5Lm" . "9uX2NvbXBs" . "ZXRl"), "_2f1a6ac516" . "83c9c2437d9" . "634e9096f39" => base64_decode("T25Qb2" . "xsQ29t" . "cGxldG" . "U="), "_5875b4ebaa48fb99" . "26838cd967f944c1" => base64_decode("T25TdXJ2Z" . "XlDb21wbG" . "V0ZQ=="), "_b3ee1ca1d7" . "e4bff63ae77" . "7968483325d" => base64_decode("cG" . "9s" . "bA" . "=="), "_7adc269a13af5" . "c45b5a1caf4ec7" . "5a795" => base64_decode("YXR0ZW1" . "wdA=="), "_28b4968d283c76aabe07eb44d" . "4cd2c3e" => base64_decode("cG9sbC5vbl9jb2" . "1wbGV0ZQ=="), "surv" . "ey" => base64_decode("c3" . "Vy" . "dm" . "V5"));
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["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_866f760e82b1e27b7" . "922b4bc24d7c497"] => $GLOBALS["__65da1b1ec2d" . "6653e8a0ab784" . "8e536215"]["_5875b4eba" . "a48fb99268" . "38cd967f94" . "4c1"], $GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"]["_28b4968d283c76aabe07" . "eb44d4cd2c3e"] => $GLOBALS["__65da1b1" . "ec2d6653e" . "8a0ab7848" . "e536215"]["_2f1a6ac51683c9c2437d96" . "34e9096f39"]];
    }
    public function OnSurveyComplete(GenericEvent $_e62ca7bbb93b52cafc82da1c2aefe9ec)
    {
        
        
        $survey = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d665" . "3e8a0ab7848e5362" . "15"]["su" . "rv" . "ey"]];
        
        
        $_7adc269a13af5c45b5a1caf4ec75a795 = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a0ab7848" . "e536215"]["_7adc269a13af5c45b5a1c" . "af4ec75a795"]];
        if (!$survey->notify_on_submit) {
            return;
        }
        $this->notification->SendSurveyCompletedNotification($survey, $_7adc269a13af5c45b5a1caf4ec75a795);
    }
    public function OnPollComplete(GenericEvent $_e62ca7bbb93b52cafc82da1c2aefe9ec)
    {
        
        
        $_b3ee1ca1d7e4bff63ae777968483325d = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a" . "0ab7848e536215"]["_b3ee1ca1d7e4bff63ae7" . "77968483325d"]];
        
        
        $_7adc269a13af5c45b5a1caf4ec75a795 = $_e62ca7bbb93b52cafc82da1c2aefe9ec[$GLOBALS["__65da1b1ec2d6653e8a0ab784" . "8e536215"]["_7adc269a13af5c45b5a1caf4ec75a79" . "5"]];
        if (!$_b3ee1ca1d7e4bff63ae777968483325d->notify_on_submit) {
            return;
        }
        $this->notification->SendPollCompletedNotification($_b3ee1ca1d7e4bff63ae777968483325d, $_7adc269a13af5c45b5a1caf4ec75a795);
    }
}