<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Api\LoginMobileController;
use App\Http\Controllers\Api\UpdatePasswordMobileController;
use App\Http\Controllers\Api\DashboardMobileController;
use App\Http\Controllers\api\GuruMobileController;
use App\Http\Controllers\Api\MateriMobileController;
use App\Http\Controllers\Api\TugasMobileController;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
    return $request->user();
});


Route::post('login', [LoginMobileController::class, 'login']);

Route::post('updatePassword', [UpdatePasswordMobileController::class, 'updatePassword']);

Route::get('tampilMataPelajaran', [DashboardMobileController::class, 'tampilMataPelajaran']);
Route::get('tampilTugas', [DashboardMobileController::class, 'tampilTugas']);

Route::get('tampilMateri', [DashboardMobileController::class, 'tampilMateri']);
Route::get('downloadMateri', [MateriMobileController::class, 'downloadMateri']);

Route::get('lihatMateri', [MateriMobileController::class, 'lihatMateri']);

Route::get('lihatTugas', [TugasMobileController::class, 'lihatTugas']);


Route::post('uploadTugas', [TugasMobileController::class, 'uploadTugas']);
Route::get('tampilRiwayatPengumpulanTugas', [TugasMobileController::class, 'tampilRiwayatPengumpulanTugas']);

Route::post('loginGuru', [LoginMobileController::class, 'loginGuru']);

Route::get('tampilMataPelajaranGuru', [GuruMobileController::class, 'tampilMataPelajaranGuru']);

Route::get('tampilTugasGuru', [GuruMobileController::class, 'tampilTugasGuru']);

Route::get('tampilMateriGuru', [GuruMobileController::class, 'tampilMateriGuru']);

Route::get('tampilTugasDetailMateriGuru', [GuruMobileController::class, 'tampilTugasDetailMateriGuru']);

Route::post('editTugasGuru', [GuruMobileController::class, 'editTugasGuru']);

Route::post('tambahTugasGuru', [GuruMobileController::class, 'tambahTugasGuru']);

Route::get('tampilPengumpulanTugasGuru', [GuruMobileController::class, 'tampilPengumpulanTugasGuru']);

Route::post('editNilaiTugasGuru', [GuruMobileController::class, 'editNilaiTugasGuru']);

Route::get('downloadTugas', [GuruMobileController::class, 'downloadTugas']);

Route::post('TambahMateriGuru', [GuruMobileController::class, 'TambahMateriGuru']);
