"use client"

import { DiffDisplay } from "./diff-display"

interface DiffToolProps {
  oldCode: string
  newCode: string
  title?: string
  language?: string
}

export function DiffTool({ oldCode, newCode, title, language }: DiffToolProps) {
  return (
    <div className="my-4">
      <DiffDisplay 
        oldText={oldCode}
        newText={newCode}
        title={title || "Code Changes"}
        language={language || "text"}
      />
    </div>
  )
}

// Helper function to create a diff tool call
export function createDiffToolCall(oldCode: string, newCode: string, title?: string, language?: string) {
  return {
    type: "diff_tool",
    props: {
      oldCode,
      newCode,
      title,
      language
    }
  }
}
