<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Office\GeneralSettingsController as GSC;

Route::group(['prefix'=>'/office/general_setting','middleware'=>['auth']], function(){
    // Twilio SMS Routes
    Route::post('/twilio_integration', [GSC::class, 'twilio_integration'])->middleware('can:create-office');
    Route::put('/twilio_integration/{twilio_integration}', [GSC::class, 'twilio_integration_update'])->middleware('can:update-office');
    Route::post('/enable_twilio', [GSC::class, 'enable_twilio'])->middleware('can:create-office');
    Route::put('/enable_twilio/{enable_twilio}', [GSC::class, 'enable_twilio_update'])->middleware('can:update-office');
    Route::post('/send_test_sms', [GSC::class, 'send_test_sms'])->middleware('can:create-office');
    Route::post('/twilio_call', [GSC::class, 'twilio_call'])->middleware('can:create-office');

    // Twilio Voice Routes
    Route::post('/twilio_voice', [GSC::class, 'twilio_voice'])->middleware('can:create-office');
    Route::put('/twilio_voice/{twilio_voice}', [GSC::class, 'twilio_voice_update'])->middleware('can:update-office');
    Route::post('/enable_twilio_voice', [GSC::class, 'enable_twilio_voice'])->middleware('can:create-office');
    Route::put('/enable_twilio_voice/{enable_twilio_voice}', [GSC::class, 'enable_twilio_voice_update'])->middleware('can:update-office');

    // Twilio WhatsApp Routes
    Route::post('/twilio_whatsapp', [GSC::class, 'twilio_whatsapp'])->middleware('can:create-office');
});

// NOTE API Routes

// Route::group(['prefix'=>'api', 'middleware'=>'auth:sanctum'], function(){
//     Route::get('office/formfield/{id}', [FormFieldController::class, 'getFormField']);
// });


?>