<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
    public function up(): void
    {
        $this->migrator->inGroup('general', function (Spatie\LaravelSettings\Migrations\SettingsBlueprint $blueprint): void {
            // Business Information
            $blueprint->add('shop_name', 'SafeTrack Auto Repair Shop');
            $blueprint->add('shop_address', '123 Main Street');
            $blueprint->add('shop_city', 'Anytown');
            $blueprint->add('shop_state', 'CA');
            $blueprint->add('shop_zip_code', '12345');
            $blueprint->add('shop_phone', '(555) 123-4567');
            $blueprint->add('shop_email', 'info@safetrack-auto.com');
            $blueprint->add('shop_website', 'https://safetrack-auto.com');
            $blueprint->add('shop_logo', null);

            // Business Hours (default Monday-Friday 8AM-6PM)
            $blueprint->add('business_hours', [
                'monday' => ['open' => '08:00', 'close' => '18:00', 'is_open' => true],
                'tuesday' => ['open' => '08:00', 'close' => '18:00', 'is_open' => true],
                'wednesday' => ['open' => '08:00', 'close' => '18:00', 'is_open' => true],
                'thursday' => ['open' => '08:00', 'close' => '18:00', 'is_open' => true],
                'friday' => ['open' => '08:00', 'close' => '18:00', 'is_open' => true],
                'saturday' => ['open' => '09:00', 'close' => '15:00', 'is_open' => true],
                'sunday' => ['open' => '00:00', 'close' => '00:00', 'is_open' => false],
            ]);
            $blueprint->add('holiday_hours', []);
            $blueprint->add('is_open_weekends', true);

            // Tax & Financial Settings
            $blueprint->add('default_tax_rate', 8.25);
            $blueprint->add('currency', 'USD');
            $blueprint->add('currency_symbol', '$');

            // System Settings
            $blueprint->add('timezone', 'America/Los_Angeles');
            $blueprint->add('date_format', 'M d, Y');
            $blueprint->add('time_format', 'g:i A');
            $blueprint->add('enable_notifications', true);
            $blueprint->add('enable_sms_notifications', true);
            $blueprint->add('enable_email_notifications', true);
        });
    }
};
