<?php

namespace App\Http\Livewire;

use Livewire\Component;

class MainContainer extends Component
{
    public $currentContent = 'Patch';
    public $loading = false;
    public $pagePaginate = 1;

    protected $listeners = ['menuChanged' => 'loadContent' , 'updatePagePaginate'];

    public function loadContent($menu)
    {
        $this->loading = true;
        $this->currentContent = $menu;
        $this->loading = false;
    }
    public function updatePagePaginate($page) {
        $this->pagePaginate = $page;
    }

    public function render()
    {
        return view('livewire.main-container');
    }

}
