<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ArtistController;
use App\Http\Controllers\AuthController;
use App\Http\Controllers\BranchControlController;
use App\Http\Controllers\RoomControlController;

Route::get('/artists/search', [App\Http\Controllers\ArtistController::class, 'search'])->name('api.artists.search');

Route::post('/login', [AuthController::class, 'login']);
Route::post('/room/receiveRegister', [RoomControlController::class, 'receiveRegister']);

Route::middleware('auth:sanctum')->group(function () {
    Route::get('/profile', [AuthController::class, 'profile']);
    Route::get('/branches',[BranchControlController::class, 'Branches']);
    Route::post('/room/sendSwitch', [RoomControlController::class, 'sendSwitch']);
    Route::post('/room/receiveSwitch', [RoomControlController::class, 'receiveSwitch']);
    Route::post('/room/heartbeat', [RoomControlController::class, 'StatusReport']);
    Route::post('/room/incrementSongCount', [RoomControlController::class, 'incrementSongCount']);
});