<?php

use App\Http\Controllers\Admin\APIs\RestaurantApi\RedeemControllerApi;
use App\Http\Controllers\Admin\APIs\RestaurantApi\RestNotificationController;
use App\Http\Controllers\Admin\APIs\RestaurantApi\RestAuthApiController;
use Illuminate\Http\Request;
use App\Http\Controllers\Admin\APIs\RestaurantApi\RestaurantControllerApi;
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Admin\APIs\RestaurantApi\RestCMSController;
Route::middleware(['restaurantApiBasicAuth'])->group(function () {

    Route::get('/v1/list-restaurant', [RestAuthApiController::class, 'viewresyaurant']);
    Route::post('/v1/rest-register', [RestAuthApiController::class, 'restRegister']);
    Route::get('/v1/list-states', [RestAuthApiController::class, 'viewstates']);

    Route::post('/v1/rest-login', [RestAuthApiController::class, 'login']);
    Route::post('/v1/rest-forgot-password', [RestAuthApiController::class, 'restForgotPassword']);
    Route::post('/v1/rest-verify-otp', [RestAuthApiController::class, 'restVerifyOTP']);
    Route::post('/v1/rest-change-password', [RestAuthApiController::class, 'restChangePassword']);
    Route::post('/v1/rest-resend-otp', [RestAuthApiController::class, 'restResendOtp']);
    Route::post('/v1/search-rest', [RestAuthApiController::class, 'searchRest']);


    Route::group(['middleware' => ['restaurant.jwt.verify']], function () {
    //     //*******************************************************Restaurant profile********************************************************
        Route::get('/v1/fetch-restaurant-profile', [RestaurantControllerApi::class, 'getRestProfileDetail']);
        Route::post('/v1/update-restaurant-profile', [RestaurantControllerApi::class, 'updateRestProfileDetail']);
        Route::post('/v1/update-restaurant-detail', [RestaurantControllerApi::class, 'updateRestaurantDetail']);
        Route::post('/v1/reset-restaurant-password', [RestaurantControllerApi::class, 'resetRestPassword']);
        Route::post('/v1/restaurant-logout', [RestaurantControllerApi::class, 'restaurantLogout']);
        Route::post('/v1/restaurant-delete_account', [RestaurantControllerApi::class, 'restDeleteAccount']);




    //     //*******************************************************Redeemption Data********************************************************

        Route::get('/v1/fetch-redeem-data', [RedeemControllerApi::class, 'getRedemedData']);
        Route::post('/v1/undo-redemption', [RedeemControllerApi::class, 'undoRedemption']);
        Route::post('/v1/search-Redemption-data', [RedeemControllerApi::class, 'searchRedemption']);

    //     //*******************************************************CMS********************************************************

        Route::get('/v1/list-of-restaurant-faqs', [RestCMSController::class, 'RestGetFaq']);
        Route::get('/v1/list-of-restaurant-about-us', [RestCMSController::class, 'RestAboutUs']);
        Route::get('/v1/list-of-restaurant-privacy-policy', [RestCMSController::class, 'RestPrivacyPolicy']);
        Route::get('/v1/list-of-restaurant-news-articles', [RestCMSController::class, 'RestNewsArticles']);
        Route::post('/v1/restaurant-contact-us', [RestCMSController::class, 'RestContactUs']);


    //     //*******************************************************notification********************************************************
        Route::get('/v1/get-notification', [RestNotificationController::class, 'getRestNotificationApi']);
        Route::post('/v1/send-notification', [RestNotificationController::class, 'sendRestNotificationApi']);
        Route::post('/v1/alert-notification', [RestNotificationController::class, 'sendAlertNotificationApi']);
    });
});
