<?php
class WhatsAppService {
    private $provider;
    
    public function __construct() {
        $this->provider = WhatsAppFactory::create();
    }
    
    public function sendText($phone, $message): array {
        return $this->provider->sendText($phone, $message);
    }
    
    public function sendImage($phone, $imageUrl, $caption = ''): array {
        return $this->provider->sendImage($phone, $imageUrl, $caption);
    }
    
    public function sendDocument($phone, $documentUrl, $filename = ''): array {
        return $this->provider->sendDocument($phone, $documentUrl, $filename);
    }
    
    public function sendCustomMessage($phone, $message): array {
        return $this->provider->sendText($phone, $message);
    }
    
    public function getStatus(): array {
        return $this->provider->checkStatus();
    }
    
    public function getQRCode(): ?string {
        return $this->provider->getQRCode();
    }
    
    public function isConnected(): bool {
        return $this->provider->isConnected();
    }
    
    public function getProviderName(): string {
        return WhatsAppFactory::getActiveProvider();
    }
}