@php
use App\Services\CartService;
use App\Services\StoreService;
use App\Services\MediaService;
use App\Services\TranslationService;
use App\Models\Store;
$store_id = session('store_id');
$store_details = app(StoreService::class)->getCurrentStoreData($store_id);
$store_details = json_decode($store_details) ?? '';
$language_code = app(TranslationService::class)->getLanguageCode();
@endphp
@php
$cart_count = '0';
@endphp
@auth
@php
$user_id = auth()->id() ?? 0;
$store_id = session('store_id') ?? '';
$favorites = getFavorites(user_id: $user_id, store_id: $store_id);
$cart_count = app(CartService::class)->getCartCount($user_id, $store_id);
@endphp
@endauth
{{-- search --}}
@if (isset($stores) &&
count($stores) >= 2 &&
url()->full() == customUrl(url()->full()) &&
session()->get('show_store_popup'))
@endif
@if (isset($stores) &&
count($stores) >= 2 &&
url()->full() == customUrl(url()->full()) &&
session()->get('show_store_popup'))
@php
session()->put('show_store_popup', false);
@endphp
@endif