'use client'
import React, { useState } from 'react';
import SearchFilters from '../components/searchFilter/SearchFilters';

export default function Home() {
  const [filters, setFilters] = useState({
    user: '42',
    state: 'FAILED',
    startDate: '2025-06-28 23:25',
  });

  const handleDeleteFilter = (key) => {
    setFilters((prev) => ({ ...prev, [key]: null }));
  };

  const handleClearAll = () => {
    setFilters({ user: null, state: null, startDate: null });
  };

  return (
    <div>
      <SearchFilters
        filters={filters}
        onDeleteFilter={handleDeleteFilter}
        onClearAll={handleClearAll}
      />
    </div>
  );
}
