<form method="GET" action="<?php echo e(route('agency.sales.index')); ?>" class="mb-4">
     <input type="hidden" name="view" value="<?php echo e($view); ?>">
     <div class="tb-bar">
          <div class="row g-3">
               <div class="col-md-3">
                    <input type="text" name="search" value="<?php echo e(request('search')); ?>" class="form-control tb-input"
                         placeholder="🔍 Kod, müşteri ismi veya e-posta…">
               </div>
               
               <?php if($view === 'list'): ?>
               <div class="col-md-2">
                    <select name="status" class="form-select tb-input" onchange="this.form.submit()">
                         <option value="">— Durum —</option>
                         <?php $__currentLoopData = ['potential' => 'Potansiyel', 'offer_sent' => 'Teklif Verildi', 'revised' => 'Revize Edildi', 'confirmed' => 'Satış Tamamlandı', 'in_progress' => 'Devam Ediyor', 'completed' => 'Kapanan', 'cancelled' => 'İptal', 'refunded' => 'İade']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $v => $l): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                              <option value="<?php echo e($v); ?>" <?php echo e(request('status') === $v ? 'selected' : ''); ?>><?php echo e($l); ?></option>
                         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
               </div>
               <?php endif; ?>

               <div class="col-md-2">
                    <select name="product_type_id" class="form-select tb-input" onchange="this.form.submit()">
                         <option value="">— Hizmet Türü —</option>
                         <?php $__currentLoopData = $productTypes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $pt): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                              <option value="<?php echo e($pt->id); ?>" <?php echo e(request('product_type_id') == $pt->id ? 'selected' : ''); ?>><?php echo e($pt->name); ?></option>
                         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
               </div>

               <div class="col-md"></div>

               <div class="col-md-auto d-flex gap-2">
                    <input type="date" name="date_from" value="<?php echo e(request('date_from')); ?>" class="form-control tb-input" title="Başlangıç" style="width:140px">
                    <input type="date" name="date_to" value="<?php echo e(request('date_to')); ?>" class="form-control tb-input" title="Bitiş" style="width:140px">
                    <button type="submit" class="btn text-white px-4" style="background:var(--cp); border-radius:12px;">Filtrele</button>
                    <?php if(request()->hasAny(['search', 'status', 'product_type_id', 'date_from', 'date_to'])): ?>
                         <a href="<?php echo e(route('agency.sales.index', ['view' => $view])); ?>" class="btn btn-light" style="border-radius:12px;"><i class="fas fa-times"></i></a>
                    <?php endif; ?>
               </div>
          </div>
     </div>
</form>

<style>
     .tb-input {
          border-radius: 12px;
          border: 1px solid #e2e8f0;
          padding: 0.6rem 1rem;
          font-size: 0.9rem;
          font-weight: 600;
     }
     .tb-input:focus {
          border-color: var(--cp);
          box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
     }
</style>
<?php /**PATH C:\xampp\htdocs\acente\resources\views/agency/sales/partials/filter_bar.blade.php ENDPATH**/ ?>