{{-- Full-colour network tiles. One tile per active platform, each carrying its own --net-* token trio (fill / on-colour / solid) as inline CUSTOM PROPERTIES only — no raw hex here (§1.3). The .rf-net- tile class + the [data-template] context decide the treatment: Vibrant fills the tile with the brand gradient, Midnight keeps it dark and glows the icon. Two brand-dependent generics ("Own Panel", "Web Traffic") close the row. --}} @php // slug -> [net token key, has a sprite glyph, light-fill needs dark glyph, lucide fallback] $netMap = [ 'instagram' => ['instagram', true, false, 'instagram'], 'tiktok' => ['tiktok', true, false, 'music'], 'youtube' => ['youtube', true, false, 'youtube'], 'facebook' => ['facebook', true, false, 'facebook'], 'twitter-x' => ['x', true, false, 'twitter'], 'telegram' => ['telegram', true, false, 'send'], 'spotify' => ['spotify', true, true, 'music-2'], 'twitch' => ['twitch', true, false, 'twitch'], 'snapchat' => ['snapchat', true, true, 'ghost'], 'whatsapp' => ['whatsapp', true, true, 'message-circle'], 'discord' => ['discord', true, false, 'message-square'], 'linkedin' => ['linkedin', true, false, 'linkedin'], ]; $platforms = \Illuminate\Support\Facades\Cache::remember('client:net-tiles', 300, function () { return \App\Models\Platform::query()->where('status', true)->orderBy('sort')->get(['name', 'slug', 'icon']); }); $tiles = []; foreach ($platforms as $p) { [$key, $sprite, $light, $lucide] = $netMap[$p->slug] ?? ['other', false, false, ($p->icon ?: 'globe')]; $tiles[] = ['key' => $key, 'label' => $p->name, 'sprite' => $sprite, 'light' => $light, 'lucide' => $lucide]; } // Brand-dependent generics (§3.1): "Own Panel" IS the panel's own brand. $tiles[] = ['key' => 'own', 'label' => __('Own Panel'), 'sprite' => false, 'light' => false, 'lucide' => 'store']; $tiles[] = ['key' => 'web', 'label' => __('Web Traffic'), 'sprite' => false, 'light' => false, 'lucide' => 'globe']; @endphp