import { useNotesStore } from "../../store/notesStore";
import Button from "../ui/Button";

export default function SaveButton() {
  const saveActive = useNotesStore((state) => state.saveActive);
  const isSaving = useNotesStore((state) => state.isSaving);

  return (
    <Button
      className={`min-w-[120px] px-5 py-2 text-sm font-semibold text-white shadow-lg shadow-orange-200 ${
        isSaving ? "bg-[#F2A28A]" : "bg-[var(--accent)]"
      }`}
      onClick={() => saveActive()}
      disabled={isSaving}
    >
      Kaydet
    </Button>
  );
}
