from typing import Dict
from typing import Any


def get_setting_value(setting: str, default: bool, data: Dict[str, Any]) -> bool:
    """Get bool value from parameters."""
    try:
        not_default = repr(not default).lower()
        tested_value = data[setting][0].lower()

        # opposite of default MUST be provided explicit to return not default
        return not default if not_default == tested_value else default
    except KeyError:
        return default