<?php
/**
 * TitanCart Settings Module
 *
 * Registers the Settings REST controller for admin settings management.
 *
 * @package TitanCart\Modules\Settings
 */

namespace TitanCart\Modules\Settings;

use TitanCart\REST\Settings\SettingsController;
use TitanCart\REST\Settings\CurrenciesController;
use TitanCart\REST\Settings\CustomerFieldsController;
use TitanCart\REST\Settings\OrderStatusController;
use TitanCart\REST\Settings\LogsController;
use TitanCart\REST\Settings\NotificationsController;
use TitanCart\REST\Extensions\ExtensionsController;

defined( 'ABSPATH' ) || exit;

class SettingsModule {

    public static function init(): void {
        add_action( 'rest_api_init', [ self::class, 'register_routes' ] );
    }

    public static function register_routes(): void {
        ( new SettingsController() )->register_routes();
        ( new CurrenciesController() )->register_routes();
        ( new CustomerFieldsController() )->register_routes();
        ( new OrderStatusController() )->register_routes();
        ( new LogsController() )->register_routes();
        ( new NotificationsController() )->register_routes();
        ( new ExtensionsController() )->register_routes();
    }
}
