<?php

namespace Database\Seeders;

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

class GuestWelcomeTemplateSeeder extends Seeder
{
    public function run()
    {
        EmailTemplate::updateOrCreate(
            ['slug' => 'guest-welcome-account'],
            [
                'name' => 'Guest Welcome Account',
                'subject' => 'Welcome to TheMiniPort - Your Account Details',
                'body' => '
                    <p>Hi {{name}},</p>
                    <p>Thank you for your inquiry on TheMiniPort.</p>
                    <p>To make it easier for you to track your inquiry and communicate with sellers, we have automatically created a buyer account for you.</p>
                    <p><strong>Here are your login details:</strong></p>
                    <ul>
                        <li><strong>Email:</strong> {{email}}</li>
                        <li><strong>Password:</strong> {{password}}</li>
                    </ul>
                    <p>Please login to view your inquiry status and messages.</p>
                    <p><a href="{{login_url}}">Click here to Login</a></p>
                    <p>Best Regards,<br>TheMiniPort Team</p>
                ',
                'variables' => 'name,email,password,login_url',
                'is_active' => true,
            ]
        );
    }
}
