"use client";
import { useUIStore } from "@/store/uiStore";
import { Search } from "lucide-react";

export const SearchToggle = () => {
  const { toggleSearch, isSearchVisible } = useUIStore();

  return (
    <button
      onClick={toggleSearch}
      className="flex items-center justify-center mr-4 cursor-pointer"
      aria-label={isSearchVisible ? "Hide search" : "Show search"}
    >
      <Search className="w-8 h-8" />
    </button>
  );
};
