<?php

use App\Http\Controllers\AccommodationController;
use App\Http\Controllers\CountryController;
use App\Http\Controllers\DistrictController;
use App\Http\Controllers\HashtagCategoryController;
use App\Http\Controllers\HashtagController;
use App\Http\Controllers\LocalguideController;
use App\Http\Controllers\PlaceController;
use App\Http\Controllers\PostController;
use App\Http\Controllers\PostImageController;
use App\Http\Controllers\ProvinceController;
use App\Http\Controllers\SubdistrictController;
use App\Http\Controllers\TourPackageController;
use App\Http\Controllers\TravelAgencyController;
use App\Http\Controllers\UserController;
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('/', function () {
    return view('welcome');
});

Route::get('/upload-post-images', function(){
    return view('pages.posts.upload-post-image');
});

Route::get('/get-countries', [CountryController::class, 'getCounties'])->name('get-countries');

Route::get('/get-districts', [DistrictController::class, 'getDistricts'])->name('get-districts');
Route::get('/get-subdistricts', [SubdistrictController::class, 'getSubdistricts'])->name('get-subdistricts');

//provinces
Route::get('/get-provinces', [ProvinceController::class, 'getProvinces'])->name('get-provinces');

//places
Route::get('/get-places', [PlaceController::class, 'getPlaces'])->name('get-places');
Route::get('/get-places-by-province-id/{province_id}', [PlaceController::class, 'getPlacesByProvinceId'])->name('get-places-by-province-id');
Route::get('/get-trending-places', [PlaceController::class, 'getTrendingPlaces'])->name('get-trending-places');
Route::resource('places', PlaceController::class);

//localguides
Route::get('/get-localguides', [LocalguideController::class, 'getLocalguides'])->name('get-localguides');
Route::resource('localguides', LocalguideController::class);

//tour packages
Route::resource('tour-packages', TourPackageController::class);
Route::get('/get-tour-packages', [TourPackageController::class, 'getTourPackages'])->name('get-tour-packages');

//travel agencies
Route::resource('travel-agencies', TravelAgencyController::class);
Route::get('/get-travel-agencies', [TravelAgencyController::class, 'getTravelAgencies'])->name('get-travel-agencies');

//accommodations
Route::get('/get-accommodations', [AccommodationController::class, 'getAccommodations'])->name('get-accommodations');

//hashtags
Route::resource('hashtags', HashtagController::class);
Route::get('/get-hashtags', [HashtagController::class, 'getHashtags'])->name('get-hashtags');
Route::get('/get-hashtags-by-hashtag-category-id/{hashtag_category_id}', [HashtagController::class, 'getHashtagsByHashtagCategoryId'])->name('get-hashtags-by-hashtag-category-id');

//hashtag category
Route::resource('hashtag-categories', HashtagCategoryController::class);
Route::get('/get-hashtag-categories', [HashtagCategoryController::class, 'getHashtagCategories'])->name('get-hashtag-categories');

//posts
Route::resource('posts', PostController::class);

//get user
Route::get('/get-users', [UserController::class, 'getUsers'])->name('get-users');
