<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\AppController;
use App\Http\Controllers\PhysiciansController;
use App\Http\Controllers\AdminController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', [AppController::class, 'index'])->name('index');
Route::get('/snyder-hemband', [AppController::class, 'snyderhemband'])->name('snyderhemband');
Route::get('/about-hemorrhoids', [AppController::class, 'aboutHem'])->name('aboutHem');
Route::get('/treatment-guide', [AppController::class, 'treatment'])->name('treatment');
Route::get('/post-treatment-care', [AppController::class, 'postCare'])->name('postCare');
Route::get('/comparing-treatment-options', [AppController::class, 'compare'])->name('compare');
Route::get('/faqs', [AppController::class, 'faqs'])->name('faqs');
Route::get('/find-a-clinic', [AppController::class, 'findAClinic'])->name('find-a-clinic');
Route::post('/submit-find-a-clinic', [AppController::class, 'submitFindAClinic'])->name('submit-find-a-clinic');
Route::get('/contact-us', [AppController::class, 'contact'])->name('contact');
Route::post('/submit-contact-us', [AppController::class, 'submitContact'])->name('submit-contact');
Route::get('/privacy-policy', [AppController::class, 'privacy'])->name('privacy');
Route::get('/terms-of-service', [AppController::class, 'terms'])->name('terms');
Route::get('/gi-survey', [AppController::class, 'giSurveyQuestions'])->name('gi-survey-questions');
Route::post('/submit-gi-survey-questions', [AppController::class, 'submitGiSurveyQuestions'])->name('submit-gi-survey-questions');

Route::prefix('/hcp/')->name('hcp.')->group(function () {
    Route::get('/', [PhysiciansController::class, 'index'])->name('index');
    // Route::get('/instructions-for-use', [PhysiciansController::class, 'instructionsForUse'])->name('instructions-for-use');
    Route::get('/practice-support', [PhysiciansController::class, 'practiceSupport'])->name('practice-support');
    Route::get('/practice-support/training', [PhysiciansController::class, 'practiceSupportTraining'])->name('practice-support-training');
    Route::get('/practice-support/reimbursement-guide', [PhysiciansController::class, 'practiceSupportReimbursement'])->name('practice-support-reimbursement');
    Route::get('/practice-support/directory-listing', [PhysiciansController::class, 'practiceSupportDirectoryListing'])->name('practice-support-directory');
    Route::post('/practice-support/submit-directory-listing', [PhysiciansController::class, 'submitPracticeSupportDirectoryListing'])->name('submit-practice-support-directory-listing-request');
    Route::get('/order-products', [PhysiciansController::class, 'orderProducts'])->name('order-products');
    Route::get('/order-products/request-samples', [PhysiciansController::class, 'orderProductsSamples'])->name('order-products-samples');
    Route::post('/submit-request-samples', [PhysiciansController::class, 'submitRequestSamples'])->name('submit-request-samples');
    Route::get('/order-products/ligators', [PhysiciansController::class, 'orderProductsLigators'])->name('order-products-ligators');
    Route::post('/submit-order-ligators', [PhysiciansController::class, 'submitOrderLigators'])->name('submit-order-ligators');
    Route::get('/order-products/marketing-materials', [PhysiciansController::class, 'orderProductsMarketing'])->name('order-products-marketing');
    Route::post('/order-products/submit-marketing-materials-request', [PhysiciansController::class, 'submitOrderProductsMarketing'])->name('submit-order-products-marketing');
    Route::get('/order-products/obp', [PhysiciansController::class, 'orderProductsObp'])->name('order-products-obp');
    Route::get('/fda-registration', [PhysiciansController::class, 'fdaRegistration'])->name('fda-registration');
    Route::get('/contact-us', [PhysiciansController::class, 'contactUs'])->name('contact-us');
    Route::post('/submit-contact-us', [PhysiciansController::class, 'submitContactUs'])->name('submit-contact-us');

    Route::get('/get-trained', [PhysiciansController::class, 'getTrained'])->name('get-trained');
    Route::post('/submit-training-request', [PhysiciansController::class, 'submitTrainingRequest'])->name('submit-training-request');
    Route::get('/reimbursement-guide', [PhysiciansController::class, 'reimbursementGuide'])->name('reimbursement-guide');
    Route::get('/privacy-policy', [PhysiciansController::class, 'privacy'])->name('privacy');
    Route::get('/terms-of-service', [PhysiciansController::class, 'terms'])->name('terms');

    Route::get('/practice-support/training', [PhysiciansController::class, 'suctionEssentials'])->name('suction-essentials');
});

Route::get('/login', [AdminController::class, 'login'])->name('login');
Route::post('/submit-login', [AdminController::class, 'submitLogin'])->name('submit-login');
Route::middleware('ensureAdminSession')->prefix('/admin')->name('admin.')->group(function () {
    Route::get('/', [AdminController::class, 'index'])->name('index');
    Route::get('/migrate-old-forms', [AdminController::class, 'mygrateOldForms'])->name('migrate-old-forms');
    Route::get('/logout', [AdminController::class, 'logout'])->name('logout');
});
