@php
    /**
     * 统一输出“当前筛选上下文”的 hidden inputs。
     *
     * 用法：
     *   @include('admin.components.filters_hidden_inputs', [
     *       'filters' => $filters ?? [],
     *       // 可选：覆盖 keys（不同页面可复用，避免输出无关字段）
     *       // 'keys' => ['status', 'merchant_id', ...],
     *   ])
     */
    $filters = (array) ($filters ?? []);
    $keys = (array) ($keys ?? [
        'status',
        'payment_status',
        'merchant_id',
        'plan_id',
        'site_subscription_id',
        'fail_only',
        'bmpa_failed_only',
        'bmpa_success_only',
        'synced_only',
        'sync_status',
        'receipt_status',
        'refund_status',
        'syncable_only',
        'renewal_missing_subscription',
        'bmpa_processable_only',
        'batch_synced_24h',
        'batch_activation_run_id',
        'batch_bmpa_run_id',
        'batch_mark_paid_and_activate_24h',
        'batch_mark_activated_24h',
        'keyword',
        'lead_id',
        'sync_error_keyword',
        'bmpa_error_keyword',
        'reconcile_mismatch',
        'refund_inconsistent',
        'created_from',
        'created_to',
    ]);
@endphp

@foreach($keys as $k)
    <input type="hidden" name="{{ $k }}" value="{{ $filters[$k] ?? '' }}">
@endforeach
