<?php

namespace Database\Seeders;

use App\Models\BusinessSetting;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Cache;

class BrandingSeeder extends Seeder
{
    public function run(): void
    {
        $settings = [
            'business_name' => '6am HRM',
            'tagline' => 'Next Generation Human Resource Management',
            'industry' => 'Technology & SaaS',
            'logo_url' => 'branding/logo.png',
            'favicon_url' => 'branding/favicon.png',
            'cover_url' => 'branding/cover.png',
            'primary' => '#179753',
            'primary_light' => '#ecfdf5',
            'primary_dark_text' => '#6ee7b7',
            'secondary' => '#64748b',
            'sidebar_rail_bg' => '#064e3b',
            'sidebar_rail_bg_dark' => '#022c22',
            'sidebar_icon_color' => '#ffffff',
            'sidebar_icon_color_dark' => '#ffffff',
            'contact_email' => 'contact@6amhrm.com',
            'contact_phone' => '+1 (555) 666-8888',
            'contact_address' => '6amTech HQ, Silicon Valley',
            'social_facebook' => 'https://facebook.com/6amhrm',
            'social_twitter' => 'https://twitter.com/6amhrm',
            'social_instagram' => 'https://instagram.com/6amhrm',
        ];

        foreach ($settings as $key => $value) {
            BusinessSetting::updateOrCreate(
                ['key' => $key],
                ['value' => $value, 'type' => 'branding']
            );
        }

        Cache::forget('business_settings_all');
    }
}
