<?php

use Livewire\Component;

use App\Models\ReportQuarter;
use App\Models\ActivitParaScolaire;
use App\Services\RepportService;
use App\Services\Chapter3Service;
return new class extends Component
{
    public $type = 3;
    public $data = [];
    public $input = [];
    public $classes = [];
    public $datas = [];
    public $educs = [];
    public $school;
    public $cutting;

    public function mount() {
        $report = ReportQuarter::where('school_id', $this->school)->where('cutting_school_year_id', $this->cutting)->first();
        $dts = $report ? ActivitParaScolaire::where('report_quarter_id', $report->id)->where('type', $this->type)->orderBy('order')->get():[];
        $this->data = $dts;
    }


    public function myInput(RepportService $service, Chapter3Service $service1) {
        $this->input = $this->data;
        $this->educs = $service1->getEducats($this->school);
        $this->classes = $service->getClass($this->school, $this->cutting);
    }

    protected function view($data = [])
    {
        return app('view')->file('C:\Users\EDUCAS\Desktop\App\V4_001\storage\framework/views/livewire/views/3aa4cf19.blade.php', $data);
    }
};
