<?php

namespace Database\Seeders;

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

class BroadcastInquiryTemplateSeeder extends Seeder
{
    public function run()
    {
        EmailTemplate::updateOrCreate(
            ['slug' => 'category-inquiry-broadcast'],
            [
                'name' => 'Category Inquiry Match Alert',
                'subject' => 'New Lead: {{product_name}} in {{category_name}}',
                'body' => '<h3>New Matching Inquiry!</h3>
                    <p>Hello {{seller_name}},</p>
                    <p>A buyer has just posted an inquiry for <strong>{{product_name}}</strong> in your category ({{category_name}}).</p>
                    <p><strong>Message:</strong><br>{{message}}</p>
                    <p><a href="{{link}}" style="background: #ff6600; color: #fff; padding: 10px 20px; text-decoration: none; border-radius: 5px;">View Lead Details</a></p>
                    <p>This lead has been shared with you as part of your premium subscription.</p>',
                'variables' => ['seller_name', 'product_name', 'category_name', 'message', 'link'],
                'is_active' => true,
            ]
        );
    }
}
