import { History } from 'lucide-react'
import type { ChangeLog } from './types'

interface HistoryTabContentProps {
  changeLogs: ChangeLog[]
}

export function HistoryTabContent({ changeLogs }: HistoryTabContentProps) {
  return (
    <div>
      <div className="space-y-4">
        {changeLogs.map((log) => (
          <div key={log.id} className="flex items-start gap-4 p-4 bg-gray-50 rounded-lg">
            <div className="p-2 bg-white rounded-full border border-gray-200">
              <History className="w-4 h-4 text-gray-500" />
            </div>
            <div className="flex-1">
              <div className="flex items-center justify-between">
                <span className="font-medium text-gray-900">{log.action}</span>
                <span className="text-sm text-gray-500">
                  {new Date(log.timestamp).toLocaleString('de-DE')}
                </span>
              </div>
              <p className="text-sm text-gray-600 mt-1">{log.description}</p>
              <p className="text-xs text-gray-400 mt-1">von {log.user}</p>
            </div>
          </div>
        ))}
      </div>
    </div>
  )
}
