@props(['panel'])
@php
$variant = $panel['variant'] ?? 'full';
$metrics = $panel['metrics'] ?? [];
$currency = $panel['currency'] ?? 'SAR';
$links = $panel['links'] ?? [];
$uid = 'storeMetrics'.substr(md5(json_encode($panel)), 0, 8);
$storefrontLabel = $panel['storefront_label'] ?? 'المتجر الإلكتروني';
$ordersLabel = $panel['orders_label'] ?? 'الطلبات';
$pendingLabel = $panel['metrics_pending_label'] ?? 'بانتظار التحصيل';
$fmt = fn (float|int|string|null $n): string => number_format((float) ($n ?? 0), 2, '.', ',');
@endphp
@if($variant === 'compact')
Online Store {{ $currency }} {{ $fmt($metrics['sales_today'] ?? 0) }} {{ (int) ($metrics['orders_today'] ?? 0) }} {{ $currency }} {{ $fmt($metrics['revenue_month'] ?? 0) }} {{ (int) ($metrics['pending_collection'] ?? 0) }}
{{ $storefrontLabel }}
لا توجد مبيعات أونلاين بعد.
@endforelseلا طلبات حديثة.
@endforelseOnline Store Channel
{{ $card['value'] }}
لا مبيعات أونلاين بعد.
@endforelse{{ $order['invoice_number'] }}
{{ $order['customer'] ?? 'زائر' }} · {{ $order['created_at'] }}
لا طلبات حديثة.
@endforelseلا منتجات منشورة بمخزون منخفض.
@endforelse