@extends('layouts.app')

@section('title', $title)

@push('styles')
<link href="{{ asset('css/stage-academy.css') }}" rel="stylesheet">
<link href="{{ asset('css/accounts.css') }}" rel="stylesheet">
@endpush

@section('content')
<div class="container-fluid">
    <div class="d-flex justify-content-between align-items-center mb-4">
        <div>
            <nav aria-label="breadcrumb">
                <ol class="breadcrumb mb-1">
                    <li class="breadcrumb-item"><a href="{{ route('dashboard') }}">{{ __('dashboard') }}</a></li>
                    <li class="breadcrumb-item"><a href="{{ route('accounts') }}">{{ __('accounts.title') }}</a></li>
                    <li class="breadcrumb-item active" aria-current="page">{{ $title }}</li>
                </ol>
            </nav>
            <h4 class="fw-bold mb-0">{{ $title }}</h4>
        </div>
        <a href="{{ route('accounts') }}" class="btn btn-outline-secondary">
            <i class="bi bi-arrow-{{ app()->getLocale() == 'ar' ? 'right' : 'left' }}"></i> {{ __('common.back') }}
        </a>
    </div>

    <div class="row g-3">
        @foreach ($cards as $card)
            <div class="col-12 col-md-6 col-lg-4">
                <a href="{{ $card['route'] }}" class="accounts-link text-decoration-none">
                    <div class="card sa-card sa-nav-card h-100">
                        <div class="card-body d-flex align-items-center gap-3">
                            <div class="sa-icon"><i class="bi bi-{{ $card['icon'] }}"></i></div>
                            <div class="sa-text">
                                <h6 class="mb-0 fw-bold">{{ $card['title'] }}</h6>
                            </div>
                            <div class="ms-auto">
                                <i class="bi bi-chevron-{{ app()->getLocale() == 'ar' ? 'left' : 'right' }}"></i>
                            </div>
                        </div>
                    </div>
                </a>
            </div>
        @endforeach
    </div>
</div>
@endsection

