import * as React from "react"; import { SqlHighlight } from "@/components/SqlHighlight"; import { cn } from "@/lib/utils"; export interface SqlEditorProps extends Omit< React.TextareaHTMLAttributes, "value" > { value: string; } export const SqlEditor = React.forwardRef( ({ className, onScroll, value, disabled, readOnly, ...props }, ref) => { const highlightRef = React.useRef(null); const handleScroll = (event: React.UIEvent) => { const highlight = highlightRef.current; if (highlight) { highlight.scrollTop = event.currentTarget.scrollTop; highlight.scrollLeft = event.currentTarget.scrollLeft; } onScroll?.(event); }; return (