{{-- Header --}}

{{ __('Deterministic Intelligence') }}

{{ __('Rule Builder') }}

{{ __('Define IF/THEN rules for automated risk detection and intervention triggers') }}

{{-- Active Rules --}}

{{ __('Active Rules') }}

@forelse($rules ?? [] as $rule)
IF {{ $rule->name ?? 'Rule' }}
{{ ($rule->is_active ?? false) ? 'Active' : 'Disabled' }}
WHEN {{ $rule->condition ?? 'condition' }} THEN {{ $rule->action ?? 'action' }}
@empty

🧠

{{ __('No rules defined yet') }}

{{ __('Create your first rule to start automating risk detection') }}

@endforelse
{{-- Example Rule Templates --}}

{{ __('Rule Templates') }}

@php $templates = [ ['name' => 'Dropout Risk', 'condition' => 'absences > 3 in 7 days', 'action' => 'Flag as High Risk', 'icon' => '⚠️'], ['name' => 'Overdue Alert', 'condition' => 'invoice_days_overdue > 14', 'action' => 'Send parent notification', 'icon' => '💰'], ['name' => 'Engagement Boost', 'condition' => 'assignment_submissions < 50%', 'action' => 'Trigger teacher playbook', 'icon' => '📚'], ['name' => 'OPS Threshold', 'condition' => 'ops_score < 40', 'action' => 'Escalate to counselor', 'icon' => '🎯'], ]; @endphp @foreach($templates as $t)
{{ $t['icon'] }} {{ $t['name'] }}
IF {{ $t['condition'] }}
THEN {{ $t['action'] }}
@endforeach
{{-- Create Modal --}}

{{ __('Create New Rule') }}

@push('scripts') @endpush