<?php

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\SectionTypeController;
use App\Http\Controllers\Api\DoctorApiController;

/*
|--------------------------------------------------------------------------
| 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:api')->get('/user', function (Request $request) {
    return $request->user();
});

Route::get('/especialities/{especiality}/configuration', [App\Http\Controllers\Api\EspecialityConfigurationController::class, 'getConfiguration']);

Route::post('/section-types/names', [SectionTypeController::class, 'getNames']);

// Rutas para doctores
Route::get('/doctors/{doctorId}/available-schedules', [DoctorApiController::class, 'getAvailableSchedules']);
Route::get('/doctors/{doctorId}/available-hours', [DoctorApiController::class, 'getAvailableHours']);
Route::get('/doctors/by-especiality/{specialityId}', [DoctorApiController::class, 'getDoctorsBySpeciality']);

use App\Http\Controllers\ChatController;

Route::post('/chat', [ChatController::class, 'ask']);

