@extends('layouts.store', ['title' => $title ?? 'لوحة التحكم | RaseedNow', 'accountMode' => true]) @php $siteSettings = \App\Models\SiteSetting::current(); $siteLogo = $siteSettings->logo_path ?: 'images/brand/raseednow-logo.png'; $accountUser = auth()->user(); $walletBalance = ($accountUser?->wallet?->balance_minor ?? 0) / 100; $avatarLetter = mb_strtoupper(mb_substr($accountUser?->display_name ?: $accountUser?->name ?: 'U', 0, 1)); $accountAvatar = $accountUser?->avatarSrc(); $accountRank = $accountUser?->rankMeta(); $accountUnreadCount = $accountUser?->customerNotifications()->whereNull('read_at')->count() ?? 0; $accountCurrencies = \App\Models\Currency::where('is_active', true)->orderByDesc('is_base')->orderBy('code')->get(); $accountCurrencyCode = session('store_currency', 'EGP'); $accountCurrency = $accountCurrencies->firstWhere('code', $accountCurrencyCode) ?: $accountCurrencies->first(); $accountCurrencyFlags = ['EGP' => 'eg.png', 'USD' => 'us.png', 'EUR' => 'eu.png', 'SAR' => 'sa.png', 'AED' => 'ae.png']; $isAccountDashboard = request()->routeIs('dashboard') || request()->routeIs('account.dashboard'); $navItems = [ ['route' => 'account.dashboard', 'label' => 'الرئيسية', 'mobile' => 'الرئيسية', 'icon' => 'M4 10.5 12 4l8 6.5V20H5v-9.5Z'], ['route' => 'account.orders', 'label' => 'طلباتي', 'mobile' => 'طلباتي', 'icon' => 'M7 4h10l2 4v12H5V8l2-4Zm-2 4h14M9 13h6m-6 4h4'], ['route' => 'account.games', 'label' => 'الألعاب', 'mobile' => 'الألعاب', 'icon' => 'M8 13h8m-6-3v6M7 18h10a4 4 0 0 0 4-4v-2a6 6 0 0 0-6-6H9a6 6 0 0 0-6 6v2a4 4 0 0 0 4 4Z'], ['route' => 'account.gift-cards', 'label' => 'الجيفت كارد', 'mobile' => 'البطاقات', 'icon' => 'M4 7h16v10H4V7Zm0 4h16m-9-7v16m6-13 2-2m-2 8 2 2'], ['route' => 'account.accounts', 'label' => 'الحسابات', 'mobile' => 'حسابات', 'icon' => 'M12 13a4 4 0 1 0 0-8 4 4 0 0 0 0 8ZM5 21a7 7 0 0 1 14 0m-3-13h4m-2-2v4'], ['route' => 'account.wallet', 'label' => 'المحفظة', 'mobile' => 'الرصيد', 'icon' => 'M4 7h16v12H4V7Zm0 4h16M16 15h2'], ['route' => 'account.ranks', 'label' => 'الترقيات', 'mobile' => 'الترقيات', 'icon' => 'm12 3 2.2 4.5 5 .7-3.6 3.5.9 5-4.5-2.4L7.5 17l.9-5L4.8 8.2l5-.7L12 3Zm-3 16 3 2 3-2'], ['route' => 'account.offers', 'label' => 'العروض', 'mobile' => 'العروض', 'icon' => 'M20 12 12 20 4 12l8-8 8 8Zm-8 4v-4h4'], ['route' => 'account.favorites', 'label' => 'المفضلة', 'mobile' => 'المفضلة', 'icon' => 'M12 21s-7-4.4-9-9a5.2 5.2 0 0 1 9-5 5.2 5.2 0 0 1 9 5c-2 4.6-9 9-9 9Z'], ['route' => 'account.notifications', 'label' => 'الإشعارات', 'mobile' => 'الإشعارات', 'icon' => 'M18 8a6 6 0 1 0-12 0c0 7-3 8-3 8h18s-3-1-3-8ZM10 20h4'], ['route' => 'account.tickets', 'label' => 'الدعم', 'mobile' => 'الدعم', 'icon' => 'M4 5h16v11H8l-4 4V5Zm5 5h6m-6 4h4'], ['route' => 'account.profile', 'label' => 'الإعدادات', 'mobile' => 'حسابي', 'icon' => 'M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Zm0-12v2m0 13v2m8.5-8.5h-2m-13 0h-2m14.1-6.1-1.4 1.4M7.8 16.2l-1.4 1.4m0-11.2 1.4 1.4m8.4 8.4 1.4 1.4'], ]; @endphp @section('content')
$isAccountDashboard])>
{{ $siteSettings->site_name_ar }} @if($accountUnreadCount > 0){{ $accountUnreadCount }}@endif @if($accountAvatar)صورة الحساب@else{{ $avatarLetter }}@endif @if($accountRank){{ $accountRank['icon'] }}@endif
@if(session('status'))
{{ session('status') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif @yield('account_content')
@endsection