"use client"
import dynamic from "next/dynamic";
import React, { useState } from 'react';

const SearchFilters = dynamic(
  () => import("../components/searchFilter/SearchFilters"),
  { ssr: false }
);

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

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

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

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