<?php

namespace App\Support;

use App\Services\Settings\SettingService;

class RegistrationSettings
{
    public static function isEnabled(): bool
    {
        try {
            return (bool) app(SettingService::class)->get(
                'auth.allow_registration',
                config('auth.allow_registration', false)
            );
        } catch (\Throwable) {
            return (bool) config('auth.allow_registration', false);
        }
    }
}
