<?php
defined( 'ABSPATH' ) || exit;

/**
 * Manual loader for the TWINT engine module.
 * Files in this module declare namespaces that do not align with the PSR-4
 * autoloader (e.g. interfaces sit under Engine\Contract while older code paths
 * still expect them at namespace-root). Include order matters here.
 */

include_once __DIR__ . DIRECTORY_SEPARATOR . 'constants.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'exceptions.php';

// Support utilities
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Support' . DIRECTORY_SEPARATOR . 'EngineHelper.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Support' . DIRECTORY_SEPARATOR . 'MarkupBuilder.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Support' . DIRECTORY_SEPARATOR . 'JsonReply.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Support' . DIRECTORY_SEPARATOR . 'TwintReply.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Support' . DIRECTORY_SEPARATOR . 'SemaphoreLock.php';

// Traits
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Mixin' . DIRECTORY_SEPARATOR . 'ConfigAwareTrait.php';

// Contracts (interfaces)
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Contract' . DIRECTORY_SEPARATOR . 'ConfigProviderInterface.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Contract' . DIRECTORY_SEPARATOR . 'EventListenerInterface.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Contract' . DIRECTORY_SEPARATOR . 'LoggerInterface.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Contract' . DIRECTORY_SEPARATOR . 'RestInterface.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Contract' . DIRECTORY_SEPARATOR . 'LockInterface.php';

// SOAP wrapper
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Soap' . DIRECTORY_SEPARATOR . 'TwintSoapClient.php';

// Services (orchestrators)
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Service' . DIRECTORY_SEPARATOR . 'BaseMailer.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Service' . DIRECTORY_SEPARATOR . 'TransactionService.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Service' . DIRECTORY_SEPARATOR . 'BackofficeTransactionService.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Service' . DIRECTORY_SEPARATOR . 'CertificateService.php';

// Twint core class
include_once __DIR__ . DIRECTORY_SEPARATOR . 'TwintCore.php';

// Adapters (concrete implementations of the contracts)
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'ConfigProvider.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'DomainEvents.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'DirectLogger.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'DirectMailer.php';
include_once __DIR__ . DIRECTORY_SEPARATOR . 'Adapter' . DIRECTORY_SEPARATOR . 'RestClient.php';
