import { useReadMetaData } from "../hooks/useReadMetaData.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { Box, Grid } from "@material-ui/core";
import { MuiVegaLite } from "@material-vega/material-ui";
//#region src/componentSystems/pageRenderer/wrappers/LineGraphWrapper.jsx
const LineGraphWrapper = (props) => {
	const $ = c(12);
	const { propsComponent } = props;
	const { id, columnSize, values } = useReadMetaData(propsComponent);
	const t0 = columnSize?.xs;
	const t1 = columnSize?.sm;
	const t2 = columnSize?.md;
	let t3;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = {
			width: "100%",
			minWidth: "100%"
		};
		$[0] = t3;
	} else t3 = $[0];
	let t4;
	if ($[1] !== values) {
		t4 = { values };
		$[1] = values;
		$[2] = t4;
	} else t4 = $[2];
	let t5;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t5 = {
			x: {
				field: "a",
				type: "ordinal"
			},
			y: {
				field: "b",
				type: "quantitative"
			},
			strokeDash: {
				field: "predicted",
				type: "nominal"
			}
		};
		$[3] = t5;
	} else t5 = $[3];
	let t6;
	if ($[4] !== t4) {
		t6 = /* @__PURE__ */ React.createElement(Box, {
			mt: 2,
			clone: true,
			overflow: "hidden",
			sx: t3
		}, /* @__PURE__ */ React.createElement(MuiVegaLite, {
			variant: "lineChart",
			color: "secondary",
			background: "paper",
			autoResize: true,
			actions: false,
			spec: {
				$schema: "https://vega.github.io/schema/vega-lite/v4.json",
				description: "Values perdicted by the model",
				width: "container",
				data: t4,
				mark: "line",
				encoding: t5
			}
		}));
		$[4] = t4;
		$[5] = t6;
	} else t6 = $[5];
	let t7;
	if ($[6] !== id || $[7] !== t0 || $[8] !== t1 || $[9] !== t2 || $[10] !== t6) {
		t7 = /* @__PURE__ */ React.createElement(Grid, {
			item: true,
			xs: t0,
			sm: t1,
			md: t2,
			key: id
		}, t6);
		$[6] = id;
		$[7] = t0;
		$[8] = t1;
		$[9] = t2;
		$[10] = t6;
		$[11] = t7;
	} else t7 = $[11];
	return t7;
};
//#endregion
export { LineGraphWrapper };

//# sourceMappingURL=LineGraphWrapper.mjs.map