<?php

namespace Database\Factories;

use App\Models\Setting;
use Illuminate\Database\Eloquent\Factories\Factory;

/**
 * @extends Factory<Setting>
 */
class SettingFactory extends Factory
{
    /**
     * Define the model's default state.
     *
     * @return array<string, mixed>
     */
    public function definition(): array
    {
        return [
            'app_name' => fake()->company(),
            'app_version' => '1.0.0',
            'app_base_url' => fake()->url(),
            'app_title' => fake()->sentence(),
            'app_description' => fake()->paragraph(),
            'app_keyword' => implode(',', fake()->words(5)),
            'app_admin' => fake()->email(),
            'app_contact' => fake()->email(),
            'app_meta' => json_encode([
                'description' => fake()->sentence(),
                'keywords' => implode(',', fake()->words(3)),
            ]),
            'app_social' => json_encode([
                'facebook' => fake()->url(),
                'twitter' => fake()->url(),
            ]),
            'app_header' => fake()->sentence(),
            'app_footer' => fake()->sentence(),
            'imap_settings' => json_encode([
                'host' => 'imap.gmail.com',
                'port' => 993,
                'encryption' => 'ssl',
            ]),
            'configuration_settings' => json_encode([
                'enable_create_from_url' => true,
                'disable_mailbox_slug' => false,
                'domains' => ['gmail.com', 'outlook.com'],
            ]),
            'ads_settings' => json_encode([
                'enabled' => false,
                'provider' => 'google',
            ]),
        ];
    }
}
