<?php

use App\Http\Controllers\Affiliate\GetAffiliateSettingsController;
use App\Http\Controllers\Affiliate\UpdateAffiliateSettingsController;
use App\Http\Controllers\Affiliate\ListAffiliatesController;
use App\Http\Controllers\Affiliate\CreateAffiliateController;
use App\Http\Controllers\Affiliate\UpdateAffiliateController;
use App\Http\Controllers\Affiliate\DeleteAffiliateController;
use Illuminate\Support\Facades\Route;

Route::group(['prefix' => 'affiliate', 'as' => 'affiliate.'], function () {
    Route::get('/settings', [GetAffiliateSettingsController::class, 'get'])->name('settings.get');
    Route::post('/settings', [UpdateAffiliateSettingsController::class, 'update'])->name('settings.update');

    Route::get('/list', [ListAffiliatesController::class, 'list'])->name('list');
    Route::post('/create', [CreateAffiliateController::class, 'create'])->name('create');
    Route::put('/update/{id}', [UpdateAffiliateController::class, 'update'])->name('update');
    Route::delete('/delete/{id}', [DeleteAffiliateController::class, 'delete'])->name('delete');
});

