<?php
use App\Http\Controllers\DashboardController;
use App\Http\Controllers\JobExperienceController;
use App\Http\Controllers\CommunityController;
use Illuminate\Support\Facades\Route;

Route::middleware('auth')
    ->prefix('dashboard')
    ->name('dashboard.')
    ->group(function () {



        Route::get('/profile', function () {
            return view('dashboard.profile');
        })->name('profile');



        Route::get('/', [DashboardController::class, 'index'])->name('index');
        Route::get('/job-experiences', [JobExperienceController::class, 'index'])->name('job-experiences.index');
        Route::get('/job-experiences/create', [JobExperienceController::class, 'create'])->name('job-experiences.create');
        Route::post('/job-experiences', [JobExperienceController::class, 'store'])->name('job-experiences.store');
        Route::get('/job-experiences/{jobExperience}', [JobExperienceController::class, 'show'])->name('job-experiences.show');
        Route::get('/job-experiences/{jobExperience}/edit', [JobExperienceController::class, 'edit'])->name('job-experiences.edit');
        Route::put('/job-experiences/{jobExperience}', [JobExperienceController::class, 'update'])->name('job-experiences.update');
        Route::delete('/job-experiences/{jobExperience}', [JobExperienceController::class, 'destroy'])->name('job-experiences.destroy');

        Route::patch('/job-experiences/{id}/toggle', [JobExperienceController::class, 'toggle'])
            ->name('job-experiences.toggle');
        Route::get('/job-experiences/active/current', [JobExperienceController::class, 'getActiveJob'])->name('job-experiences.active');
        Route::post('/job-experiences/{jobExperience}/publish', [JobExperienceController::class, 'publish'])->name('job-experiences.publish');
        Route::post('/job-experiences/{jobExperience}/unpublish', [JobExperienceController::class, 'unpublish'])->name('job-experiences.unpublish');

        Route::post('/share-pay/submit', [DashboardController::class, 'sharePay'])->name('share-pay.submit');

        // Route::get('/community', function () {
        //     return view('dashboard.community.index');
        // })->name('community.index');
        // Route::get('/community', [DashboardController::class, 'communityIndex'])->name('community.index');

        // Route::get('/settings', function () {
        //     return view('dashboard.settings');
        // })->name('settings');
    });

