import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
import { UdpCalendarDay, UdpCalendarMonth, UdpCalendarWeek, UdpCalendarYear } from "udp-react-stencil-component-library";
import clsx from "clsx";
//#region src/UI/templates/calendar/UdpCalendar.jsx
const useStyles = makeStyles((theme) => ({ root: {} }));
const UdpCalendar = (props) => {
	const $ = c(15);
	let className;
	let initialView;
	let otherProps;
	if ($[0] !== props) {
		({initialView, className, ...otherProps} = props);
		$[0] = props;
		$[1] = className;
		$[2] = initialView;
		$[3] = otherProps;
	} else {
		className = $[1];
		initialView = $[2];
		otherProps = $[3];
	}
	const classes = useStyles(props);
	let t0;
	if ($[4] !== initialView || $[5] !== otherProps) {
		t0 = () => {
			switch (initialView) {
				case "day": return /* @__PURE__ */ React.createElement(UdpCalendarDay, { props: otherProps });
				case "week": return /* @__PURE__ */ React.createElement(UdpCalendarWeek, { props: otherProps });
				case "month": return /* @__PURE__ */ React.createElement(UdpCalendarMonth, { props: otherProps });
				case "year": return /* @__PURE__ */ React.createElement(UdpCalendarYear, { props: otherProps });
				default: return /* @__PURE__ */ React.createElement(UdpCalendarMonth, { props: otherProps });
			}
		};
		$[4] = initialView;
		$[5] = otherProps;
		$[6] = t0;
	} else t0 = $[6];
	const renderCalendarView = t0;
	let t1;
	if ($[7] !== className || $[8] !== classes.root) {
		t1 = clsx(classes.root, className);
		$[7] = className;
		$[8] = classes.root;
		$[9] = t1;
	} else t1 = $[9];
	let t2;
	if ($[10] !== renderCalendarView) {
		t2 = renderCalendarView();
		$[10] = renderCalendarView;
		$[11] = t2;
	} else t2 = $[11];
	let t3;
	if ($[12] !== t1 || $[13] !== t2) {
		t3 = /* @__PURE__ */ React.createElement("div", { className: t1 }, t2);
		$[12] = t1;
		$[13] = t2;
		$[14] = t3;
	} else t3 = $[14];
	return t3;
};
//#endregion
export { UdpCalendar };

//# sourceMappingURL=UdpCalendar.mjs.map