<?php

namespace Database\Seeders;

use App\Models\EmailTemplate;
use Illuminate\Database\Seeder;

class MarketingSeeder extends Seeder
{
    public function run(): void
    {
        EmailTemplate::query()->updateOrCreate(
            ['slug' => 'newsletter-welcome'],
            [
                'name' => 'Newsletter Welcome',
                'subject' => 'Welcome to 8Stores updates',
                'preheader' => 'Product drops, offers, and store announcements from 8Stores.',
                'body_html' => '<h2>Welcome to 8Stores</h2><p>Thanks for subscribing. We will send useful product drops, offers, and important store announcements.</p><p><a href="/" class="email-button">Shop latest products</a></p>',
                'is_active' => true,
            ]
        );
    }
}
