<?php

namespace App\Services;

use Illuminate\Support\Facades\Http;

class WhatsAppNotifier
{
    public function send(string $message)
    {
        $response = Http::withHeaders([
            'Authorization' => config('services.fonnte.token'),
        ])->post('https://api.fonnte.com/send', [
            'target' => config('services.fonnte.target'),
            'message' => $message,
        ]);

        return $response->json();
    }
}