import { greyScale } from "../utilities/style/verticalStyles.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { lighten, makeStyles, useTheme } from "@material-ui/core";
import ReactDiffViewer, { DiffMethod } from "react-diff-viewer";
//#region src/diffChecker/DiffChecker.jsx
const useStyles = makeStyles((theme) => ({ root: {} }));
const DiffChecker = (t0) => {
	const $ = c(33);
	const { leftTitle, rightTitle, oldValue, newValue } = t0;
	const classes = useStyles();
	const theme = useTheme();
	let t1;
	if ($[0] !== theme.palette.success.light) {
		t1 = lighten(theme.palette.success.light, .9);
		$[0] = theme.palette.success.light;
		$[1] = t1;
	} else t1 = $[1];
	let t2;
	if ($[2] !== theme.palette.error.light) {
		t2 = lighten(theme.palette.error.light, .9);
		$[2] = theme.palette.error.light;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] !== theme.palette.success.light) {
		t3 = lighten(theme.palette.success.light, .5);
		$[4] = theme.palette.success.light;
		$[5] = t3;
	} else t3 = $[5];
	let t4;
	if ($[6] !== theme.palette.success.light) {
		t4 = lighten(theme.palette.success.light, .5);
		$[6] = theme.palette.success.light;
		$[7] = t4;
	} else t4 = $[7];
	let t5;
	if ($[8] !== theme.palette.error.light) {
		t5 = lighten(theme.palette.error.light, .5);
		$[8] = theme.palette.error.light;
		$[9] = t5;
	} else t5 = $[9];
	let t6;
	if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
		t6 = greyScale("main");
		$[10] = t6;
	} else t6 = $[10];
	let t7;
	if ($[11] !== theme.palette.primary.main) {
		t7 = lighten(theme.palette.primary.main, .8);
		$[11] = theme.palette.primary.main;
		$[12] = t7;
	} else t7 = $[12];
	let t8;
	if ($[13] !== theme.palette.primary.main) {
		t8 = lighten(theme.palette.primary.main, .9);
		$[13] = theme.palette.primary.main;
		$[14] = t8;
	} else t8 = $[14];
	let t9;
	if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = greyScale("light");
		$[15] = t9;
	} else t9 = $[15];
	let t10;
	if ($[16] !== t1 || $[17] !== t2 || $[18] !== t3 || $[19] !== t4 || $[20] !== t5 || $[21] !== t7 || $[22] !== t8) {
		t10 = { variables: { light: {
			addedBackground: t1,
			removedBackground: t2,
			wordAddedBackground: t3,
			wordRemovedBackground: "#fdb8c0",
			addedGutterBackground: t4,
			removedGutterBackground: t5,
			gutterBackground: t6,
			codeFoldGutterBackground: t7,
			codeFoldBackground: t8,
			emptyLineBackground: t9
		} } };
		$[16] = t1;
		$[17] = t2;
		$[18] = t3;
		$[19] = t4;
		$[20] = t5;
		$[21] = t7;
		$[22] = t8;
		$[23] = t10;
	} else t10 = $[23];
	const newStyles = t10;
	let t11;
	if ($[24] !== leftTitle || $[25] !== newStyles || $[26] !== newValue || $[27] !== oldValue || $[28] !== rightTitle) {
		t11 = /* @__PURE__ */ React.createElement(ReactDiffViewer, {
			oldValue,
			newValue,
			splitView: true,
			compareMethod: DiffMethod.WORDS,
			styles: newStyles,
			leftTitle,
			rightTitle
		});
		$[24] = leftTitle;
		$[25] = newStyles;
		$[26] = newValue;
		$[27] = oldValue;
		$[28] = rightTitle;
		$[29] = t11;
	} else t11 = $[29];
	let t12;
	if ($[30] !== classes.root || $[31] !== t11) {
		t12 = /* @__PURE__ */ React.createElement("div", { className: classes.root }, t11);
		$[30] = classes.root;
		$[31] = t11;
		$[32] = t12;
	} else t12 = $[32];
	return t12;
};
//#endregion
export { DiffChecker };

//# sourceMappingURL=DiffChecker.mjs.map