<?php

namespace Database\Seeders;

use App\Models\SiteSetting;
use Illuminate\Database\Seeder;

class SiteSettingSeeder extends Seeder
{
    public function run(): void
    {
        $rows = [
            // Login hero
            ['key' => 'login_brand_initial',   'label' => 'Logo initial (single letter)',  'value' => 'R',                                              'group' => 'login_hero', 'type' => 'text',     'sort_order' => 1],
            ['key' => 'login_chapter_brand',   'label' => 'Chapter brand',                  'value' => 'BNI · Pune East',                                'group' => 'login_hero', 'type' => 'text',     'sort_order' => 2],
            ['key' => 'login_brand_title',    'label' => 'League title',                   'value' => 'Rachhit Visitor League',                         'group' => 'login_hero', 'type' => 'text',     'sort_order' => 3],
            ['key' => 'login_season_tagline', 'label' => 'Season tagline',                 'value' => 'Season 2026 · Six weeks · Ten teams',           'group' => 'login_hero', 'type' => 'text',     'sort_order' => 4],
            ['key' => 'login_hero_line_1',    'label' => 'Hero word 1',                    'value' => 'GROW.',                                          'group' => 'login_hero', 'type' => 'text',     'sort_order' => 5],
            ['key' => 'login_hero_line_2',    'label' => 'Hero word 2 (gold)',             'value' => 'CONNECT.',                                       'group' => 'login_hero', 'type' => 'text',     'sort_order' => 6],
            ['key' => 'login_hero_line_3',    'label' => 'Hero word 3 (crimson)',          'value' => 'WIN.',                                           'group' => 'login_hero', 'type' => 'text',     'sort_order' => 7],
            ['key' => 'login_hero_paragraph', 'label' => 'Description paragraph',          'value' => "The official scoreboard for BNI Pune East & North's 6-week Visitor League. Track every visitor, 121, referral and dance card — across ten captains and seventy-five members.", 'group' => 'login_hero', 'type' => 'textarea', 'sort_order' => 8],

            // Login hero stat values
            ['key' => 'login_stat_teams_value',      'label' => 'Stat value · teams',      'value' => '', 'group' => 'login_hero', 'type' => 'text', 'sort_order' => 9],
            ['key' => 'login_stat_members_value',    'label' => 'Stat value · members',    'value' => '', 'group' => 'login_hero', 'type' => 'text', 'sort_order' => 10],
            ['key' => 'login_stat_weeks_value',      'label' => 'Stat value · weeks',      'value' => '', 'group' => 'login_hero', 'type' => 'text', 'sort_order' => 11],
            ['key' => 'login_stat_activities_value', 'label' => 'Stat value · activities', 'value' => '', 'group' => 'login_hero', 'type' => 'text', 'sort_order' => 12],

            // Weekly recap card footer
            ['key' => 'recap_tagline', 'label' => 'Recap footer · tagline', 'value' => 'Grow · Connect · Win', 'group' => 'recap', 'type' => 'text', 'sort_order' => 13],
            ['key' => 'recap_url',     'label' => 'Recap footer · URL',     'value' => 'bni-puneeast.in',     'group' => 'recap', 'type' => 'text', 'sort_order' => 14],

            // Weekly focus — per-week emoji / activity / note (blank = use built-in default)
            ['key' => 'focus_w1_emoji',    'label' => 'Week 1 focus · emoji',    'value' => '🤝',                                              'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 1],
            ['key' => 'focus_w1_activity', 'label' => 'Week 1 focus · activity', 'value' => '121s',                                            'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 2],
            ['key' => 'focus_w1_note',     'label' => 'Week 1 focus · note',     'value' => 'Lock in two one-to-ones every week.',             'group' => 'weekly_focus', 'type' => 'textarea', 'sort_order' => 3],
            ['key' => 'focus_w2_emoji',    'label' => 'Week 2 focus · emoji',    'value' => '🎯',                                              'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 4],
            ['key' => 'focus_w2_activity', 'label' => 'Week 2 focus · activity', 'value' => 'Referrals',                                       'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 5],
            ['key' => 'focus_w2_note',     'label' => 'Week 2 focus · note',     'value' => 'Bring a qualified referral to the table.',        'group' => 'weekly_focus', 'type' => 'textarea', 'sort_order' => 6],
            ['key' => 'focus_w3_emoji',    'label' => 'Week 3 focus · emoji',    'value' => '💼',                                              'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 7],
            ['key' => 'focus_w3_activity', 'label' => 'Week 3 focus · activity', 'value' => 'TYFCB',                                           'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 8],
            ['key' => 'focus_w3_note',     'label' => 'Week 3 focus · note',     'value' => 'Cumulative TYFCB — top 3 teams win 300 / 200 / 100.', 'group' => 'weekly_focus', 'type' => 'textarea', 'sort_order' => 9],
            ['key' => 'focus_w4_emoji',    'label' => 'Week 4 focus · emoji',    'value' => '⭐',                                              'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 10],
            ['key' => 'focus_w4_activity', 'label' => 'Week 4 focus · activity', 'value' => 'Testimonial',                                     'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 11],
            ['key' => 'focus_w4_note',     'label' => 'Week 4 focus · note',     'value' => 'Power-of-one testimonial. 10 pts each.',          'group' => 'weekly_focus', 'type' => 'textarea', 'sort_order' => 12],
            ['key' => 'focus_w5_emoji',    'label' => 'Week 5 focus · emoji',    'value' => '🔎',                                              'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 13],
            ['key' => 'focus_w5_activity', 'label' => 'Week 5 focus · activity', 'value' => 'Specific Ask',                                    'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 14],
            ['key' => 'focus_w5_note',     'label' => 'Week 5 focus · note',     'value' => 'Help your member close a specific ask.',          'group' => 'weekly_focus', 'type' => 'textarea', 'sort_order' => 15],
            ['key' => 'focus_w6_emoji',    'label' => 'Week 6 focus · emoji',    'value' => '🚀',                                              'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 16],
            ['key' => 'focus_w6_activity', 'label' => 'Week 6 focus · activity', 'value' => 'Visitors',                                        'group' => 'weekly_focus', 'type' => 'text',     'sort_order' => 17],
            ['key' => 'focus_w6_note',     'label' => 'Week 6 focus · note',     'value' => 'Final push — Open & Focused visitors stack big.', 'group' => 'weekly_focus', 'type' => 'textarea', 'sort_order' => 18],

            // Login form copy
            ['key' => 'login_form_kicker',    'label' => 'Form kicker',                    'value' => 'Admin Console',                                  'group' => 'login_form', 'type' => 'text',     'sort_order' => 1],
            ['key' => 'login_form_title',     'label' => 'Form title',                     'value' => 'Sign in to enter scores',                        'group' => 'login_form', 'type' => 'text',     'sort_order' => 2],
            ['key' => 'login_form_subtitle',  'label' => 'Form subtitle',                  'value' => 'Only chapter admins and the Rachhit committee can enter weekly meeting points. Captains and members view standings without signing in.', 'group' => 'login_form', 'type' => 'textarea', 'sort_order' => 3],
        ];

        foreach ($rows as $row) {
            SiteSetting::updateOrCreate(['key' => $row['key']], $row);
        }
    }
}
