@extends('layouts.seller.app', ['page' => $menuSeller['ad_wallet']['active'] ?? 'ad_wallet', 'sub_page' => $menuSeller['ad_wallet']['route']['balance']['sub_active'] ?? 'ad_wallet_balance']) @section('title', __('labels.ad_wallet_balance')) @section('header_data') @php $page_title = __('labels.ad_wallet_balance'); $page_pretitle = __('labels.seller') . " " . __('labels.ad_wallet'); @endphp @endsection @php use App\Support\Currency\CurrencyDisplay; $walletCurrencyCode = strtoupper((string) ($wallet?->currency_code ?? ($systemSettings['currency'] ?? ''))); $walletMoney = fn ($amount) => CurrencyDisplay::format($amount, $walletCurrencyCode, $systemSettings['currencySymbol'] ?? null); $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('seller.dashboard')], ['title' => __('labels.ad_wallet'), 'url' => ''] ]; @endphp @section('seller-content')
@if(! ($featureEnabled ?? false))

{{ __('labels.ad_feature_disabled') }}

{{ __('labels.ad_feature_disabled_hint') }}
@endif

{{ __('labels.ad_wallet_balance') }}

@if(($topupPermission ?? false) && ($featureEnabled ?? false)) @endif

{{ __('labels.current_balance') }}

{{ __('labels.ad_wallet_available_for_spend') }}
{{ $wallet ? $walletMoney($wallet->balance) : $walletMoney(0) }}
@if(! empty($settings['cpcRate']))
{{ __('labels.ad_wallet_estimated_clicks', [ 'count' => $wallet ? (int) floor($wallet->balance / $settings['cpcRate']) : 0, ]) }}
@endif

{{ __('labels.wallet_information') }}

@if(! empty($settings['cpcRate'])) @endif @if(! empty($settings['walletMinTopup'])) @endif
{{ __('labels.wallet_id') }} {{ $wallet ? $wallet->id : 'N/A' }}
{{ __('labels.currency') }} {{ $walletCurrencyCode }}
{{ __('labels.ad_cpc_rate') }} {{ $walletMoney((float) $settings['cpcRate']) }}
{{ __('labels.ad_wallet_min_topup') }} {{ $walletMoney((float) $settings['walletMinTopup']) }}
{{ __('labels.last_updated') }} {{ $wallet ? $wallet->updated_at->format('d M Y, H:i') : 'N/A' }}
@endsection