<?php

namespace Database\Seeders;

use App\Models\SystemConfiguration;
use App\Settings\SystemSettings;
use Illuminate\Database\Seeder;

class SystemConfigurationSeeder extends Seeder
{
    public function run(): void
    {
        SystemConfiguration::instance();

        $settings = app(SystemSettings::class);

        if (filled($settings->app_name)) {
            return;
        }

        $settings->app_name = 'DST Collection';
        $settings->about_app = 'Sistem manajemen toko dan produksi DST Collection.';
        $settings->email = 'info@dstcollection.test';
        $settings->phone = '081234567890';
        $settings->address = 'Jl. Contoh No. 1, Jakarta';
        $settings->save();
    }
}
