<?php

namespace App\Http\Livewire;

use Symfony\Component\HttpFoundation\Request;
use Livewire\Component;
use Illuminate\Support\Facades\Auth;

class BloqueadoController extends Component
{
    public function mount()
    {
        if (Auth::user()->status == "ACTIVO"){
            redirect()->route('dashboard');
        }
    }
    public function render()
    {
            return view('livewire.bloqueado.component')
            ->extends('layouts.theme.auth.app')
            ->section('content');
    }

    public function logout(Request $request) {
        Auth::logout();
        return redirect('/login');
    }
}
