"use client";

export function AdvancedSearchToggle({
  open,
  onToggle,
  label = "جستجوی پیشرفته",
  className = "flex w-full items-center justify-between px-4 py-3 text-sm font-medium text-[var(--muted)]",
}: {
  open: boolean;
  onToggle: () => void;
  label?: string;
  className?: string;
}) {
  return (
    <button type="button" className={className} onClick={onToggle}>
      {label}
      <svg
        viewBox="0 0 24 24"
        className={`h-4 w-4 shrink-0 text-slate-400 transition-transform ${open ? "rotate-180" : ""}`}
        fill="none"
        stroke="currentColor"
        strokeWidth="1.5"
        strokeLinecap="round"
        strokeLinejoin="round"
        aria-hidden
      >
        <path d="M6 9l6 6 6-6" />
      </svg>
    </button>
  );
}
