package com.openosrs.client.test;

import com.openosrs.client.core.bridge.ClientConnector;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Simple test to verify basic bridge structure.
 */
public class BridgeTest {
    private static final Logger logger = LoggerFactory.getLogger(BridgeTest.class);
    
    public static void main(String[] args) {
        logger.info("Starting bridge connectivity test...");
        
        // Test that we can instantiate the ClientConnector
        logger.info("ClientConnector isConnected: {}", ClientConnector.isConnected());
        
        // Test connection attempt
        ClientConnector.connectToRuneLiteClient()
            .thenAccept(client -> {
                if (client != null) {
                    logger.info("Successfully connected to RuneLite client: {}", client.getClass().getSimpleName());
                } else {
                    logger.info("No RuneLite client found (expected in test environment)");
                }
            })
            .exceptionally(throwable -> {
                logger.warn("Connection attempt failed: {}", throwable.getMessage());
                return null;
            });
        
        logger.info("Bridge test completed");
    }
}