@php
$catalogRules = (array) config("feature_catalog.features.{$feature->key}.rules", []);
$supportsIdentifierMix = array_key_exists('identifier_methods', $catalogRules);
@endphp
@foreach($rulesByPanel as $panel => $rule)
@php
$conditions = (array) $rule->conditions;
$countries = implode(', ', (array) data_get($conditions, 'countries_allowed', []));
$requiresKyc = (bool) data_get($conditions, 'requires_kyc');
$requiresPhone = (bool) data_get($conditions, 'requires_phone');
$allowWalletId = (bool) data_get($conditions, 'identifier_methods.wallet_id', data_get($catalogRules, 'identifier_methods.wallet_id', false));
$allowEmail = (bool) data_get($conditions, 'identifier_methods.email', data_get($catalogRules, 'identifier_methods.email', false));
$allowMobile = (bool) data_get($conditions, 'identifier_methods.mobile', data_get($catalogRules, 'identifier_methods.mobile', false));
$verifiedEmail = (bool) data_get($conditions, 'require_verified_email', false);
$verifiedMobile = (bool) data_get($conditions, 'require_verified_mobile', false);
$panelIcons = [
\App\Models\FeatureAccessRule::PANEL_USER => 'fa-user',
\App\Models\FeatureAccessRule::PANEL_MERCHANT => 'fa-store',
\App\Models\FeatureAccessRule::PANEL_AGENT => 'fa-user-tie',
];
$enabledRules = collect([$rule->is_visible, $rule->is_accessible, $requiresKyc, $requiresPhone])->filter()->count();
$panelLabel = $panelOptions[$panel] ?? ucfirst($panel);
@endphp
{{ $rule->is_visible ? __('Visible') : __('Hidden') }}
{{ $rule->is_accessible ? __('Accessible') : __('Blocked') }}
{{ $requiresKyc ? __('KYC required') : __('No KYC gate') }}
{{ $requiresPhone ? __('Phone required') : __('No phone gate') }}
@if($supportsIdentifierMix)
{{ __('Recipient Identifier Methods') }}
{{ __('Choose how a recipient can be looked up on this panel. Verified-only toggles enforce verification on the matched account.') }}
@endif
@endforeach