'use client';


import { renderFileChildren } from "./utils/renderFileChildren.js";
import { templateRender } from "./utils/templateRender.js";
import { useFileInstance } from "./utils/useFileInstance.js";
import { jsx } from "react/jsx-runtime";

//#region src/react/File.tsx
function File({ file, lineAnnotations, selectedLines, options, className, style, renderAnnotation, renderHeaderMetadata, prerenderedHTML, renderHoverUtility }) {
	const { ref, getHoveredLine } = useFileInstance({
		file,
		options,
		lineAnnotations,
		selectedLines,
		prerenderedHTML
	});
	return /* @__PURE__ */ jsx("file-diff", {
		ref,
		className,
		style,
		children: templateRender(renderFileChildren({
			file,
			renderAnnotation,
			renderHeaderMetadata,
			renderHoverUtility,
			lineAnnotations,
			getHoveredLine
		}), prerenderedHTML)
	});
}

//#endregion
export { File };
//# sourceMappingURL=File.js.map