import { Iframe } from "../UI/iframe/Iframe.mjs";
import { c } from "react-compiler-runtime";
import React, { createRef } from "react";
import { makeStyles } from "@material-ui/core";
//#region src/containers/IframeContainer.jsx
const useStyles = makeStyles((theme) => ({ root: { height: (props) => props.height ? props.height : "100vh" } }));
const IframeContainer = (props) => {
	const $ = c(10);
	let other;
	let src;
	if ($[0] !== props) {
		({src, ...other} = props);
		$[0] = props;
		$[1] = other;
		$[2] = src;
	} else {
		other = $[1];
		src = $[2];
	}
	let t0;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = createRef();
		$[3] = t0;
	} else t0 = $[3];
	const containerRef = t0;
	const classes = useStyles(props);
	let t1;
	if ($[4] !== other || $[5] !== src) {
		t1 = /* @__PURE__ */ React.createElement(Iframe, {
			containerRef,
			src,
			...other
		});
		$[4] = other;
		$[5] = src;
		$[6] = t1;
	} else t1 = $[6];
	let t2;
	if ($[7] !== classes.root || $[8] !== t1) {
		t2 = /* @__PURE__ */ React.createElement("div", {
			ref: containerRef,
			className: classes.root
		}, t1);
		$[7] = classes.root;
		$[8] = t1;
		$[9] = t2;
	} else t2 = $[9];
	return t2;
};
//#endregion
export { IframeContainer };

//# sourceMappingURL=IframeContainer.mjs.map