<?php

use App\Http\Controllers\ServicePackageController;
use Illuminate\Support\Facades\Route;

Route::get('/service-packages',  [ServicePackageController::class, 'index'])->middleware('permission:service-package,view');
Route::post('/service-packages', [ServicePackageController::class, 'store'])->middleware('permission:service-package,add');

Route::get('/service-packages/me',      [ServicePackageController::class, 'myServicePackages']);
Route::post('/service-packages/me',     [ServicePackageController::class, 'storeMine']);
Route::get('/service-packages/provider', [ServicePackageController::class, 'providerServicePackages']);
Route::get('/service-packages/{id}',    [ServicePackageController::class, 'show'])->middleware('permission:service-package,view');
Route::put('/service-packages/{id}',    [ServicePackageController::class, 'update'])->middleware('permission:service-package,edit');
Route::delete('/service-packages/{id}', [ServicePackageController::class, 'destroy'])->middleware('permission:service-package,delete');

Route::patch('/service-packages/{id}/accept', [ServicePackageController::class, 'acceptByProvider']);
Route::patch('/service-packages/{id}/refuse', [ServicePackageController::class, 'refuseByProvider']);
