<?php

declare(strict_types=1);

namespace App\Domain\Settings;

/**
 * Runtime-mutable feature flags backed by the `app_settings` table.
 *
 * Keys not stored in the table fall back to the caller-supplied default
 * so a fresh database (or a stripped row) is treated as enabled rather
 * than silently turning a feature off.
 */
interface AppSettings
{
    public const KEY_AUDIT_REPORT_RECEIVED_ENABLED = 'audit_report_received_enabled';
    public const KEY_AUDIT_BLOCKLIST_REQUEST_ENABLED = 'audit_blocklist_request_enabled';

    public function getBool(string $key, bool $default): bool;

    public function setBool(string $key, bool $value): void;

    /**
     * @return array<string, string>
     */
    public function all(): array;
}
