<?php

use App\Http\Controllers\Api\AuthController;
use App\Http\Controllers\Api\OLDLMS\ClaimController;
use App\Http\Controllers\Api\OLDLMS\MembershipController;
use App\Http\Controllers\Api\OLDLMS\PaymentController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| 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('linksehat.old.auth')->group(function() {
    Route::get('member/{member_id}', [MembershipController::class, 'show'])->name('member.show');
    Route::post('check-membership', [MembershipController::class, 'check']);
    Route::post('check-limit', [MembershipController::class, 'checkLimit']);
    Route::post('check-coverage-limit', [MembershipController::class, 'checkLimit']);
    Route::get('linking-rules', [MembershipController::class, 'linkingRules']);
    Route::post('linking-validate', [MembershipController::class, 'linkingValidate']);

    Route::post('claim-create', [ClaimController::class, 'store']);
    Route::post('claim-update-diagnosis', [ClaimController::class, 'updateClaimDiagnosis']);

});