<?php

namespace App\Helpers;

class EmailConfig
{
    /**
     * Get SMTP configuration
     */
    public static function getSmtpConfig()
    {
        return [
            'host' => 'smtp.gmail.com',
            'port' => 587,
            'encryption' => 'tls',
            'username' => 'dizaartsystem@gmail.com',
            'password' => 'cvbxowrrhresjbxo',
            'from_email' => 'dizaartsystem@gmail.com',
            'from_name' => 'Dizcall Ai',
        ];
    }

    /**
     * Configure mail settings
     */
    public static function configureMail()
    {
        $config = self::getSmtpConfig();
        
        config([
            'mail.default' => 'smtp',
            'mail.mailers.smtp.host' => $config['host'],
            'mail.mailers.smtp.port' => $config['port'],
            'mail.mailers.smtp.encryption' => $config['encryption'],
            'mail.mailers.smtp.username' => $config['username'],
            'mail.mailers.smtp.password' => $config['password'],
            'mail.from.address' => $config['from_email'],
            'mail.from.name' => $config['from_name'],
        ]);
    }
}
