<?php

namespace App\Filament\Resources\AppSettingResource\Pages;

use App\Filament\Resources\AppSettingResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;

class ListAppSettings extends ListRecords
{
    protected static string $resource = AppSettingResource::class;

    protected function getHeaderActions(): array
    {
        return [
            //
        ];
    }

    public function mount(): void
    {
        if (\App\Models\AppSetting::count() === 0) {
            \App\Models\AppSetting::create([
                'wallet_enabled' => true,
                'direct_payment_enabled' => false,
            ]);
        }

        parent::mount();
    }
}
