/**
 * =============================================================================
 * QWHPI — Quebec Weekly Housing Price Index
 * Author  : Simon-Pierre Boucher
 * Contact : contact@spboucher.ai
 * File    : web/components/SearchButton.tsx
 * Purpose : Header search button — dispatches the ⌘K palette shortcut.
 * =============================================================================
 */
"use client";

export default function SearchButton() {
  return (
    <button
      className="kbd-btn"
      aria-label="Open command palette"
      onClick={() =>
        window.dispatchEvent(
          new KeyboardEvent("keydown", { key: "k", metaKey: true }))}
    >
      Search <kbd>⌘K</kbd>
    </button>
  );
}
