protected function extractComponentSettings($aSettings, $sSlug)
    {
        $aOut = [];

        foreach ($aSettings as $oSetting) {

            //  If the object contains a `fields` property then consider this a field set and inception
            if (isset($oSetting->fields)) {

                $aOut = array_merge(
                    $aOut,
                    $this->extractComponentSettings(
                        $oSetting->fields,
                        $sSlug
                    )
                );

            } else {

                $sValue = appSetting($oSetting->key, $sSlug);
                if (is_null($sValue) && isset($oSetting->default)) {
                    $sValue = $oSetting->default;
                }
                $aOut[$oSetting->key] = $sValue;
            }
        }

        return $aOut;
    }