<?php

namespace App\Listeners;

use App\Services\School\AccountEventService;
use App\Services\School\EnrollmentEventService;
use App\Services\School\PaymentEventService;

class SchoolEventListener
{
    public function __construct(
        private EnrollmentEventService $enrollment,
        private PaymentEventService $payments,
        private AccountEventService $accounts
    ) {
    }

    public function handleAdmissionUnderReview(array $data, array $studentdata): void
    {
        $this->enrollment->admissionUnderReview($data, $studentdata);
    }

    public function handlePaymentPending(array $data, array $studentdata = []): void
    {
        $this->enrollment->paymentPending($data, $studentdata);
    }

    public function handleStudentEnrolled(array $data, array $studentdata = []): void
    {
        $this->enrollment->studentEnrolled($data, $studentdata);
    }

    public function handleWithdrawUnderReview(array $data, array $studentdata = []): void
    {
        $this->enrollment->withdrawUnderReview($data, $studentdata);
    }

    public function handleRefundPending(array $data, array $studentdata = []): void
    {
        $this->enrollment->refundPending($data, $studentdata);
    }

    public function handleWithdrawn(array $data, array $studentdata = []): void
    {
        $this->enrollment->withdrawn($data, $studentdata);
    }

    public function handleDenied(array $data, array $studentdata = []): void
    {
        $this->enrollment->denied($data, $studentdata);
    }

    public function handleWaitlist(array $data, array $studentdata = []): void
    {
        $this->enrollment->waitlist($data, $studentdata);
    }

    public function handleEnrollmentStatusChanged(array $data, array $studentdata = []): void
    {
        $this->enrollment->enrollmentStatusChanged($data, $studentdata);
    }

    public function handlePaymentReceived(array $data, array $studentdata = []): void
    {
        $this->payments->paymentReceived($data, $studentdata);
    }

    public function handleExtraCharge(array $data, array $studentdata = []): void
    {
        $this->payments->extraCharge($data, $studentdata);
    }

    public function handleNewAccountAdded(array $userData): void
    {
        $this->accounts->newAccountAdded($userData);
    }

    public function handleStudentRegistered(array $data): void
    {
        $this->accounts->studentRegistered($data);
    }

    public function handleDeleteUnverifiedUser(array $user): void
    {
        $this->accounts->deleteUnverifiedUser($user);
    }

    public function handleUserRegistered(array $user): void
    {
        $this->accounts->userRegistered($user);
    }

    public function handleUserProfileUpdated(array $user): void
    {
        $this->accounts->userProfileUpdated($user);
    }

    public function handleUserDeactivated(array $user): void
    {
        $this->accounts->userDeactivated($user);
    }

    public function handleScoresPosted(array $data): void
    {
        $this->accounts->scoresPosted($data);
    }

    public function handleFinalScoreReleased(array $data): void
    {
        $this->accounts->finalScoreReleased($data);
    }

    public function handleStudentMarkedAbsent(array $record): void
    {
        $this->accounts->studentMarkedAbsent($record);
    }

    public function handleStudentMarkedLate(array $record): void
    {
        $this->accounts->studentMarkedLate($record);
    }

    public function handlePaymentMissed(array $user): void
    {
        $this->accounts->paymentMissed($user);
    }

    public function handleClassScheduleUpdated(array $data): void
    {
        $this->accounts->classScheduleUpdated($data);
    }

    public function handleNewMessageReceived(array $data): void
    {
        $this->accounts->newMessageReceived($data);
    }

    public function handleSystemAnnouncementPosted(array $data): void
    {
        $this->accounts->systemAnnouncementPosted($data);
    }

    public function handleCustomNotification(array $data): void
    {
        $this->accounts->customNotification($data);
    }
}
