@extends('layouts.seller.app', ['page' => $menuSeller['ad_campaigns']['active'] ?? 'ad_campaigns', 'sub_page' => $menuSeller['ad_campaigns']['route']['create']['sub_active'] ?? 'ad_campaigns_create']) @section('title', __('labels.create_ad_campaign')) @section('header_data') @php $page_title = __('labels.create_ad_campaign'); $page_pretitle = __('labels.ad_campaigns_subtitle'); @endphp @endsection @php use App\Support\Currency\CurrencyDisplay; $breadcrumbs = [ ['title' => __('labels.home'), 'url' => route('seller.dashboard')], ['title' => __('labels.ad_campaigns'), 'url' => route('seller.ads.campaigns.index')], ['title' => __('labels.create_ad_campaign'), 'url' => ''], ]; $cpcRate = (float) ($settings['cpcRate'] ?? 0); $minBudget = max(1, (float) ($settings['walletMinTopup'] ?? 1)); $adWalletCurrencyCode = strtoupper((string) ($walletCurrencyCode ?? ($systemSettings['currency'] ?? ''))); $currencySymbol = CurrencyDisplay::label($adWalletCurrencyCode, $systemSettings['currencySymbol'] ?? null); $adWalletMoney = fn ($amount) => CurrencyDisplay::format($amount, $adWalletCurrencyCode, $systemSettings['currencySymbol'] ?? null); @endphp @section('seller-content')
@unless($featureEnabled)

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

{{ __('labels.ad_feature_disabled_hint') }}
@endunless {{-- ── Insufficient balance banner ─────────────── --}}

{{ __('labels.ad_wallet_balance') }}: {{ $adWalletMoney($walletBalance) }}

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

{{ __('labels.ad_topup_wallet') }} →
{{-- ── Main form card ───────────────────────────── --}}

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

@csrf
@if($products->isEmpty())
{{ __('labels.ad_campaign_no_products') }}
@else {{-- Product selector --}}
{{-- Rendered as select for simplicity; JS enhances with preview chip --}}
{{-- Live ad preview chip --}}
{{-- Budget slider --}}
{{-- Live value display --}}
{{ $adWalletMoney($minBudget) }} {{ $adWalletCurrencyCode }}
{{-- Preset chips --}}
@foreach([100, 500, 1000, 2000, 5000] as $preset) @if($preset >= $minBudget)
{{ $adWalletMoney($preset) }}
@endif @endforeach
{{-- Estimated stats pills --}}
—
{{ __('labels.ad_estimated_clicks') }}
—
{{ __('labels.ad_estimated_reach') }}
@if($cpcRate <= 0)
{{ __('labels.ad_cpc_rate_not_configured') }}
@endif @endif {{-- end products not empty --}}
@unless($products->isEmpty()) @endunless
{{-- ── What You Get strip ───────────────────────── --}}

✦ {{ __('labels.what_you_get') ?? 'What you get' }}

📊
{{ __('labels.ad_benefit_dashboard_title') }}
{{ __('labels.ad_benefit_dashboard_body') }}
⏸️
{{ __('labels.ad_benefit_pause_title') }}
{{ __('labels.ad_benefit_pause_body') }}
💰
{{ __('labels.ad_benefit_refund_title') }}
{{ __('labels.ad_benefit_refund_body') }}
{{-- end benefit strip --}}
@endsection @push('scripts') @endpush