<?php

namespace Database\Seeders\Tenant;

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

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

    private function getData()
    {
        return [
            [
                'tab' => 'Site',
                'section' => 'Content',
                'group' => 'Events',
                'name' => 'Events enabled',
                'config_key' => 'app-content-events-enabled',
                'type' => 'boolean',
                'value' => false,
                'feature' => 'content-management',
                'description' => 'Enable events type content pages on site',
                'order' => 5,
            ],
            [
                'tab' => 'Site',
                'section' => 'Content',
                'group' => 'Events',
                'name' => 'Events default template',
                'config_key' => 'app-content-events-default-template',
                'type' => 'string',
                'value' => '',
                'source' => 'templates',
                'feature' => 'content-management',
                'description' => 'Select template which should be set as default when creating events',
                'order' => 6,
            ],
            [
                'tab' => 'Site',
                'section' => 'Content',
                'group' => 'Guides',
                'name' => 'Guides enabled',
                'config_key' => 'app-content-guides-enabled',
                'type' => 'boolean',
                'value' => false,
                'feature' => 'content-management',
                'description' => 'Enable guides type content pages on site',
                'order' => 7,
            ],
            [
                'tab' => 'Site',
                'section' => 'Content',
                'group' => 'Guides',
                'name' => 'Guides default template',
                'config_key' => 'app-content-guides-default-template',
                'type' => 'string',
                'value' => '',
                'source' => 'templates',
                'feature' => 'content-management',
                'description' => 'Select template which should be set as default when creating guides',
                'order' => 8,
            ],
            [
                'tab' => 'Site',
                'section' => 'Content',
                'group' => 'Reviews',
                'name' => 'Reviews enabled',
                'config_key' => 'app-content-reviews-enabled',
                'type' => 'boolean',
                'value' => false,
                'feature' => 'content-management',
                'description' => 'Enable reviews type content pages on site',
                'order' => 9,
            ],
            [
                'tab' => 'Site',
                'section' => 'Content',
                'group' => 'Reviews',
                'name' => 'Reviews default template',
                'config_key' => 'app-content-reviews-default-template',
                'type' => 'string',
                'value' => '',
                'source' => 'templates',
                'feature' => 'content-management',
                'description' => 'Select template which should be set as default when creating reviews',
                'order' => 10,
            ],
        ];
    }
}
