

import { SearchIcon } from "@buzzwaretech/propel/icons";
import { cn } from "@buzzwaretech/utils";

type Props = {
  isActive?: boolean;
};

export function SidebarSearchButton(props: Props) {
  const { isActive } = props;
  return (
    <div
      className={cn(
        "shadow-sm grid aspect-square size-8 flex-shrink-0 place-items-center rounded-md border-[0.5px] border-strong outline-none hover:bg-surface-2",
        {
          "border-accent-strong-200 bg-accent-primary/10 hover:bg-accent-primary/10":
            isActive,
        },
      )}
    >
      <SearchIcon
        className={cn("size-4 text-tertiary", {
          "text-accent-secondary": isActive,
        })}
      />
    </div>
  );
}
