<?php

use App\Http\Controllers\Api\AuthApiController;
use App\Http\Controllers\Api\MobileInventoryController;
use Illuminate\Support\Facades\Route;

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

Route::middleware('api.token')->group(function () {
    Route::get('me', [AuthApiController::class, 'me']);
    Route::post('logout', [AuthApiController::class, 'logout']);
    Route::get('dashboard', [MobileInventoryController::class, 'dashboard']);
    Route::post('scan', [MobileInventoryController::class, 'scan']);
    Route::get('barang', [MobileInventoryController::class, 'barang']);
    Route::get('barang/{item}', [MobileInventoryController::class, 'barangDetail']);
    Route::post('penggantian', [MobileInventoryController::class, 'penggantian']);
    Route::get('notifikasi', [MobileInventoryController::class, 'notifikasi']);
});
