<?php

use App\Http\Controllers\Bookings\ListBookingsSalesInvoiceController;
use App\Http\Controllers\Bookings\UpdateBookingSalesInvoiceController;
use App\Http\Controllers\Transactions\ListMappableTransactionsController;
use Illuminate\Support\Facades\Route;

Route::group(['prefix' => 'v1', 'as' => 'apipub.'], function () {
    Route::group(['middleware' => 'token.check'], function () {
        Route::get('transactions/mappable/query', [ListMappableTransactionsController::class, 'list'])->name('transaction.mappable.list');

        Route::group(['prefix' => 'booking', 'as' => 'booking.'], function () {
            Route::get('/sales-invoice/list', [ListBookingsSalesInvoiceController::class, 'list'])->name('booking.sales-invoice.list');
            Route::post('/sales-invoice', [UpdateBookingSalesInvoiceController::class, 'update'])->name('booking.sales-invoice.update');
            Route::post('/sales-invoice/batch', [UpdateBookingSalesInvoiceController::class, 'updateBatch'])->name('booking.sales-invoice.batch.update');
        });
    });
});
