<?php

use Illuminate\Support\Facades\Route;
use Modules\Operation\Http\Controllers\FirstPageController;

Route::prefix('operationManage')->group(function () {
    Route::prefix('firstPage')->group(function(){
        Route::post('add', [FirstPageController::class, 'add']);
        Route::post('enableStatus', [FirstPageController::class, 'enableStatus']);
        Route::post('setConfig', [FirstPageController::class, 'setConfig']);
        Route::post('delete', [FirstPageController::class, 'delete']);
        Route::get('list', [FirstPageController::class, 'list']);
    });


});

Route::prefix('operation')->group(function () {
    // 轮播图管理
    Route::prefix('banner')->group(function () {
        // 列表
        Route::any('list',[\Modules\Operation\Http\Controllers\BannerController::class,'list']);
        // 添加
        Route::post('add',[\Modules\Operation\Http\Controllers\BannerController::class,'add']);
        // 编辑
        Route::post('edit/{id}',[\Modules\Operation\Http\Controllers\BannerController::class,'edit']);
        // 删除
        Route::post('del/{id}',[\Modules\Operation\Http\Controllers\BannerController::class,'del']);
        // 快速状态
        Route::post('editStatus/{id}',[\Modules\Operation\Http\Controllers\BannerController::class,'updateStatus']);
    });

    // 频道管理
    Route::prefix('channel')->group(function (){
        // 列表
        Route::any('list',[\Modules\Operation\Http\Controllers\ChannelController::class,'list']);
        // 添加
        Route::post('add',[\Modules\Operation\Http\Controllers\ChannelController::class,'add']);
        // 启用
        Route::post('enableStatus/{id}',[\Modules\Operation\Http\Controllers\ChannelController::class,'enableStatus']);
        // 配置
        Route::post("setting/{id}",[\Modules\Operation\Http\Controllers\ChannelController::class,"setting"]);
        // 删除
        Route::post("del/{id}",[\Modules\Operation\Http\Controllers\ChannelController::class,"del"]);
    });
});
