<?php

namespace Database\Seeders\Tenant;

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

class AutoTraderValuationVatPriceFieldSettingSeeder 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' => 'Autotrader',
                'group' => 'Valuation',
                'name' => 'VAT-qualifying valuation price',
                'config_key' => 'valuation-auto-trader-vat-price-field',
                'type' => 'string',
                'min_tier' => 'pro',
                'value' => 'amountNoVatGBP',
                'description' => 'For VAT-qualifying vehicles (e.g. LCVs) AutoTrader returns no combined price, only '
                    . 'the no-VAT and excluding-VAT figures. Choose which one the customer valuation should show. '
                    . 'Standard cars are unaffected.',
                'choices' => [
                    [ "value" => "amountNoVatGBP", "name" => "No-VAT price" ],
                    [ "value" => "amountExcludingVatGBP", "name" => "Price excluding VAT" ],
                ],
            ],
        ];
    }
}
