{{-- Usage: Structure jaan-boojh kar aisi hai: - min-height BAHAR wale div par -> jagah pehle reserve, CLS = 0 - wire:ignore ANDAR wale div par -> Livewire ad ke DOM ko chhoo nahi sakta Dono ko ek hi div par mat rakhiye, warna re-render par reserve height bhi freeze ho jaati hai. CSS/JS @once me hai -> page par kitne bhi slots hon, output sirf ek baar. --}} @props(['position']) @php $cfg = config("ads.slots.{$position}"); $provider = $cfg['provider'] ?? null; $id = $cfg['id'] ?? null; $height = $cfg['height'] ?? null; $width = $cfg['width'] ?? null; $format = $cfg['format'] ?? 'auto'; // id khaali ho to slot render hi nahi hoga -- khaali dabba nahi banega $show = config('ads.enabled') && $provider && $id; $insStyle = 'display:inline-block;' . ($width ? "width:{$width}px;" : '') . ($height ? "height:{$height}px;" : ''); @endphp @if ($show) {{-- ================= ONE-TIME CSS ================= --}} @once @push('styles') @endpush @endonce