<?php

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

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

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


    public function mount() {
        $this->data = $this->srvs->getCycle($this->school, 4);
        $this->years = $this->srvs->getYears($this->school, $this->cutting, 14, 16);
        $this->total = $this->srvs->getCmptYearTle_II($this->school, $this->cutting);
    }

    public function data($str, $year) {
        $datas = $this->srvs->cpteYearLevel($str, $year, $this->school, $this->cutting, 14, 16);
        return $datas;
    }

    public function total1($year) {
        $datas = $this->srvs->cpteYearTle($year, $this->school, $this->cutting, 14, 16);
        return $datas;
    }

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