<?php

namespace Database\Seeders\Tenant;

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

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

    private function data(): array
    {
        return [
            [
                'tab' => 'Automotive',
                'section' => 'Sales',
                'group' => 'Deal Builder',
                'name' => 'Allow home delivery',
                'config_key' => 'deal-builder-delivery-allow-home',
                'type' => 'boolean',
                'value' => false,
                'description' => 'Allow customers to have their vehicle delivered to their home address',
                'order' => 10,
            ],
            [
                'tab' => 'Automotive',
                'section' => 'Sales',
                'group' => 'Deal Builder',
                'name' => 'Max home delivery distance (miles)',
                'config_key' => 'deal-builder-delivery-max-distance',
                'type' => 'string',
                'value' => null,
                'description' => 'Maximum distance from the dealership for home delivery (in miles)',
                'order' => 11,
            ],
        ];
    }
}
