<?php

namespace App\Repositories\Core;

use Qoraiche\MailEclipse\MailEclipse;
use Illuminate\Support\Facades\DB;

class Mailer
{
    public static function getTemplates()
    {
        // $mailables = MailEclipse::getMailables();
        // DB::rollBack();
        // dump($mailables);
        /*
                $mailables = (null !== $mailables) ? $mailables->sortBy('name') : collect([]);
                foreach ($mailables as $mailable)
                {
                    $templates[] = $mailable['name'];
                }

        */
        $templates = ['EventInscription','EventSaveTheDate','MatinalesBadge','MatinalesThanks','MatinalesReplays'];
        return $templates;
    }

    public static function getTemplate($template_id)
    {
        $templates = self::getTemplates();
        return $templates[$template_id];
    }
}
