<?php

use App\Http\Controllers\AppointmentController;
use App\Http\Controllers\Auth\AuthenticatedSessionController;
use App\Http\Controllers\BasicController;
use App\Http\Controllers\BlogCategoryController;
use App\Http\Controllers\BlogController;
use App\Http\Controllers\CareerCategoryController;
use App\Http\Controllers\CareerController;
use App\Http\Controllers\CertificateController;
use App\Http\Controllers\CommitmentController;
use App\Http\Controllers\DepartmentController;
use App\Http\Controllers\DoctorController;
use App\Http\Controllers\FounderController;
use App\Http\Controllers\HomeController;
use App\Http\Controllers\LeadershipController;
use App\Http\Controllers\ResearchController;
use App\Http\Controllers\ServiceCategoryController;
use App\Http\Controllers\ServiceController;
use App\Http\Controllers\SpecialtyController;
use App\Http\Controllers\StoryController;
use App\Http\Controllers\TagController;
use App\Http\Controllers\UserPermissionController;
use Illuminate\Support\Facades\Route;

















/*
|--------------------------------------------------------------------------
| 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('/', [HomeController::class, 'index'])->name('home');
Route::get('/services', [HomeController::class, 'services'])->name('services');
Route::get('/about', [HomeController::class, 'about'])->name('about');
Route::get('/contact', [HomeController::class, 'contact'])->name('contact');
Route::get('/doctors', [HomeController::class, 'doctor'])->name('doctors');
Route::get('/filter-doctors', [HomeController::class, 'filter']);

Route::get('/history', [HomeController::class, 'history'])->name('history');
Route::get('/mission&values', [HomeController::class, 'mission'])->name('mission');
Route::get('/leadershipTeam', [HomeController::class, 'leadership'])->name('leadership');
Route::get('/career', [HomeController::class, 'career'])->name('career');
Route::get('/blog', [HomeController::class, 'blog'])->name('blog');
Route::get('/research', [HomeController::class, 'research'])->name('research');
Route::get('/accreditations', [HomeController::class, 'accreditations'])->name('accreditations');
Route::get('/contact', [HomeController::class, 'contact'])->name('contact');
Route::get('/booking', [HomeController::class, 'booking'])->name('booking');
Route::post('/appointment', [AppointmentController::class, 'store'])->name('appointment.store');

Route::get('/login/user', [HomeController::class, 'login'])->name('login.index');
Route::get('/register/user', [HomeController::class, 'register'])->name('register.index');








Route::get('/login', [AuthenticatedSessionController::class, 'create'])->name('login');
Route::post('login', [AuthenticatedSessionController::class, 'store'])->name('userlogin');

Route::get('/dashboard', function () {
    return view('admin.dashboard');
    // return view('index');
})->middleware(['auth'])->name('dashboard');

Route::middleware('auth')->group(function () {

    Route::get('newform', [BasicController::class, 'newform']);
    Route::get('datatables', [BasicController::class, 'datatables']);

    Route::resource('service_category', ServiceCategoryController::class);
    Route::resource('service', ServiceController::class);
    Route::resource('department', DepartmentController::class);
    Route::resource('specialty', SpecialtyController::class);
    Route::resource('doctor', DoctorController::class);
    Route::resource('leadership', LeadershipController::class);
    Route::resource('blog_category', BlogCategoryController::class);
    Route::resource('tags', TagController::class);
    Route::resource('blogs', BlogController::class);
    Route::resource('researchs', ResearchController::class);


    Route::get('commitment', [CommitmentController::class, 'index'])->name('commitment.index');
    Route::get('commitment/create', [CommitmentController::class, 'create'])->name('commitment.create');
    Route::post('commitment/store', [CommitmentController::class, 'store'])->name('commitment.store');
    Route::get('commitment/{id}/edit', [CommitmentController::class, 'edit'])->name('commitment.edit');
    Route::Put('commitment/{id}/update', [CommitmentController::class, 'update'])->name('commitment.update');
    Route::delete('commitment/{id}/destroy', [CommitmentController::class, 'destroy'])->name('commitment.destroy');

    Route::get('values', [CommitmentController::class, 'indexValue'])->name('values.index');
    Route::get('values/create', [CommitmentController::class, 'createValue'])->name('values.create');
    Route::post('values/store', [CommitmentController::class, 'storeValue'])->name('values.store');
    Route::get('values/{id}/edit', [CommitmentController::class, 'editValue'])->name('values.edit');
    Route::Put('values/{id}/update', [CommitmentController::class, 'updateValue'])->name('values.update');
    Route::Delete('values/{id}/destroy', [CommitmentController::class, 'destroyValue'])->name('values.destroy');

    Route::get('mission', [CommitmentController::class, 'mission'])->name('mission.index');
    Route::get('mission/{id}/update', [CommitmentController::class, 'updateMission'])->name('mission.update');

    Route::get('vision', [CommitmentController::class, 'vision'])->name('vision.index');
    Route::Put('vision/{id}/update', [CommitmentController::class, 'updateVision'])->name('vision.update');







    Route::resource('stories', StoryController::class);
    Route::resource('founders', FounderController::class);
    Route::resource('career_category', CareerCategoryController::class);
    Route::resource('careers', CareerController::class);
    Route::resource('certificate', CertificateController::class);
    Route::resource('histories', HistoryController::class);
    Route::resource('missions', MissionController::class);
    Route::resource('leaderships', LeadershipController::class);
    Route::resource('blogs', BlogController::class);
    Route::resource('researchs', ResearchController::class);
    Route::resource('accreditation', AccreditationsController::class);
    Route::resource('contacts', ContactController::class);
    Route::resource('bookings', BookingController::class);
});

require __DIR__ . '/auth.php';
