<?php
require __DIR__.'/vendor/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$kernel->bootstrap();

use App\Models\Page;

$pages = [
    ['slug' => 'cookie-policy', 'title' => 'Cookie Policy', 'content' => '<p>Welcome to Swagvio\'s Cookie Policy. We use cookies to enhance your experience.</p>'],
    ['slug' => 'help-center', 'title' => 'Help Center', 'content' => '<p>Welcome to the Swagvio Help Center. Find answers to your questions here.</p>'],
    ['slug' => 'blog', 'title' => 'Blog', 'content' => '<p>Welcome to the Swagvio blog. Stay tuned for news.</p>'],
    ['slug' => 'faq', 'title' => 'FAQ', 'content' => '<p><strong>Frequently Asked Questions</strong></p><p>1. How do I post an ad?<br>Register an account and click Post Ad.</p>'],
    ['slug' => 'report-a-scam', 'title' => 'Report a scam', 'content' => '<p>To report a scam, please email <a href="mailto:support@swagvio.com">support@swagvio.com</a> with evidence.</p>'],
    ['slug' => 'safe-browsing', 'title' => 'Safe Browsing', 'content' => '<p>Read our tips about safe browsing on Swagvio.</p>'],
    ['slug' => 'trust-and-safety', 'title' => 'Trust & Safety', 'content' => '<p>We prioritize trust and safety for all our users.</p>'],
    ['slug' => 'careers', 'title' => 'Careers', 'content' => '<p>Join the Swagvio team. Check out our open positions.</p>']
];

foreach ($pages as $p) {
    Page::updateOrCreate(['slug' => $p['slug']], $p);
}
echo "Seeded remaining pages.\n";
