<?php

use App\Services\Chapter2Service;
use Livewire\Component;

return new class extends Component
{
    public $data;
    public $school;
    public $cutting;
    public $tls = [];
    protected $srvs;

    public function boot(Chapter2Service $srvs) {
        $this->srvs = $srvs;
    }

    public function mount() {
        $this->data = $this->srvs->getCycle($this->school, 3);
        $this->tls = $this->srvs->cmpte1tls($this->school, $this->cutting);
    }


    public function compte($level) {
        return $this->srvs->effectif($level, $this->school, $this->cutting);
    }

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