import { vscode } from "../utils/vscode";

const OptimizeCurrentDiff = () => {
  return (
    <button
      id="optimize-current-diff"
      className="optimize-button center"
      style={{ fontSize: "1em" }}
      onClick={(e) => {
        e.stopPropagation();
        vscode.postMessage({ type: "optimizeCurrentDiff" });
      }}
    >
      <span className="codicon codicon-github-action"></span>
      <span>Optimize modified code</span>
    </button>
  );
};

export default OptimizeCurrentDiff;
