<?php

namespace Database\Seeders\Tenant;

use Illuminate\Database\Seeder;
use Mtc\MercuryDataModels\SeoDefault;

class SeoSettingSeeder extends Seeder
{
    public function run()
    {
        collect($this->defaults())
            ->each(fn($default) => SeoDefault::query()->updateOrCreate(['section' => $default['section']], $default));
    }

    private function defaults(): array
    {
        return [
            [
                'section' => 'page',
                'title' => '{{TITLE}} | {{SITE_NAME}}',
                'description' => '{{CONTENT_EXCERPT}}',
            ],
            [
                'section' => 'dealership',
                'title' => '{{TITLE}} | {{SITE_NAME}}',
                'description' => '',
            ],
            [
                'section' => 'offer',
                'title' => '{{TITLE}} | {{MAKE}} Offers | {{SITE_NAME}} ',
                'description' => '{{CONTENT_EXCERPT}}',
            ],
            [
                'section' => 'filter',
                'title' => '{{BODY_STYLE}} {{MAKE}} {{MODEL}} Used Vehicle Offers | Page {{PAGE}} | {{SITE_NAME}}',
                'description' => '',
            ],
            [
                'section' => 'offers',
                'title' => '{{BODY_STYLE}} {{MAKE}} {{MODEL}} New Vehicle Offers | {{SITE_NAME}}',
                'description' => '',
            ],
            [
                'section' => 'vehicle',
                'title' => '{{TITLE}} | {{MAKE}} Offers | {{SITE_NAME}} ',
                'description' => '{{CONTENT_EXCERPT}}',
            ],
        ];
    }
}
