<?php

namespace Database\Seeders\Tenant;

use App\Facades\Settings;
use Illuminate\Database\Seeder;

class SearchContentSettingSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        collect($this->data())
            ->each(fn ($setting) => Settings::make($setting));
    }

    private function data(): array
    {
        return [
            [
                'tab' => 'Automotive',
                'section' => 'General',
                'group' => 'Search Content',
                'name' => 'Include Vehicle Attributes',
                'config_key' => 'search-include-vehicle-attributes',
                'type' => 'boolean',
                'value' => false,
                'description' => 'Include selected vehicle attribute values in the search index. Allows searching vehicles by selected attributes',
            ],
            [
                'tab' => 'Automotive',
                'section' => 'General',
                'group' => 'Search Content',
                'name' => 'Searchable Attributes',
                'config_key' => 'search-vehicle-attribute-slugs',
                'type' => 'list',
                'source' => 'vehicle-attributes',
                'value' => null,
                'description' => 'Select which vehicle attributes to include in the search index.',
            ],
        ];
    }
}
