import StepLabelExport from "./StepLabel.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import clsx from "clsx";
import PropTypes from "prop-types";
import { makeStyles, withStyles } from "@material-ui/core/styles";
import Stepper from "@material-ui/core/Stepper";
import Step from "@material-ui/core/Step";
import Check from "@material-ui/icons/esm/Check";
import StepConnector from "@material-ui/core/StepConnector";
//#region src/UI/inputs/menus/AmbientStepper/AmbientStepper.jsx
const QontoConnector = withStyles({
	alternativeLabel: {
		top: 10,
		left: "calc(-50% + 16px)",
		right: "calc(50% + 16px)"
	},
	active: { "& $line": { borderColor: "#09A58C" } },
	completed: { "& $line": { borderColor: "#09A58C" } },
	line: {
		borderColor: "#eaeaf0",
		borderTopWidth: 3,
		borderRadius: 1
	}
})(StepConnector);
const useQontoStepIconStyles = makeStyles({
	root: {
		color: "#09A58C",
		display: "flex",
		height: 22,
		alignItems: "center"
	},
	active: { color: "#09A58C" },
	circle: {
		width: 16,
		height: 16,
		borderRadius: "50%",
		border: "2px solid currentColor"
	},
	completed: {
		color: "#09A58C",
		zIndex: 1,
		fontSize: 18
	},
	stepLabel: { display: "none" },
	rootStepper: { background: "blue" }
});
const QontoStepIcon = (props) => {
	const $ = c(11);
	const classes = useQontoStepIconStyles();
	const { active, completed } = props;
	let t0;
	if ($[0] !== active || $[1] !== classes.active || $[2] !== classes.root) {
		t0 = clsx(classes.root, { [classes.active]: active });
		$[0] = active;
		$[1] = classes.active;
		$[2] = classes.root;
		$[3] = t0;
	} else t0 = $[3];
	let t1;
	if ($[4] !== classes.circle || $[5] !== classes.completed || $[6] !== completed) {
		t1 = completed ? /* @__PURE__ */ React.createElement(Check, { className: classes.completed }) : /* @__PURE__ */ React.createElement("div", { className: classes.circle });
		$[4] = classes.circle;
		$[5] = classes.completed;
		$[6] = completed;
		$[7] = t1;
	} else t1 = $[7];
	let t2;
	if ($[8] !== t0 || $[9] !== t1) {
		t2 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t1);
		$[8] = t0;
		$[9] = t1;
		$[10] = t2;
	} else t2 = $[10];
	return t2;
};
QontoStepIcon.propTypes = {
	active: PropTypes.bool,
	completed: PropTypes.bool
};
const useStyles = makeStyles((theme) => ({
	root: { width: "100%" },
	button: { marginRight: theme.spacing(1) },
	instructions: {
		marginTop: theme.spacing(1),
		marginBottom: theme.spacing(1)
	},
	rootStep: { marginTop: 0 }
}));
const AmbientStepper = (t0) => {
	const $ = c(19);
	const { activeStep, steps, orientation } = t0;
	const classes = useStyles();
	const t1 = classes.root;
	let t2;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t2 = {
			background: "transparent",
			padding: 0
		};
		$[0] = t2;
	} else t2 = $[0];
	let t3;
	if ($[1] !== classes.rootStepper) {
		t3 = { root: classes.rootStepper };
		$[1] = classes.rootStepper;
		$[2] = t3;
	} else t3 = $[2];
	let t4;
	if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = /* @__PURE__ */ React.createElement(QontoConnector, null);
		$[3] = t4;
	} else t4 = $[3];
	let t5;
	if ($[4] !== classes.rootStep || $[5] !== classes.stepLabel || $[6] !== steps) {
		let t6;
		if ($[8] !== classes.rootStep || $[9] !== classes.stepLabel) {
			t6 = (label) => /* @__PURE__ */ React.createElement(Step, {
				classes: { root: classes.rootStep },
				key: label
			}, /* @__PURE__ */ React.createElement(StepLabelExport, {
				className: classes.stepLabel,
				StepIconComponent: QontoStepIcon
			}, /* @__PURE__ */ React.createElement("span", { style: { fontSize: 14 } }, label)));
			$[8] = classes.rootStep;
			$[9] = classes.stepLabel;
			$[10] = t6;
		} else t6 = $[10];
		t5 = steps.map(t6);
		$[4] = classes.rootStep;
		$[5] = classes.stepLabel;
		$[6] = steps;
		$[7] = t5;
	} else t5 = $[7];
	let t6;
	if ($[11] !== activeStep || $[12] !== orientation || $[13] !== t3 || $[14] !== t5) {
		t6 = /* @__PURE__ */ React.createElement(Stepper, {
			style: t2,
			classes: t3,
			alternativeLabel: true,
			activeStep,
			connector: t4,
			orietation: orientation
		}, t5);
		$[11] = activeStep;
		$[12] = orientation;
		$[13] = t3;
		$[14] = t5;
		$[15] = t6;
	} else t6 = $[15];
	let t7;
	if ($[16] !== classes.root || $[17] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: t1 }, t6);
		$[16] = classes.root;
		$[17] = t6;
		$[18] = t7;
	} else t7 = $[18];
	return t7;
};
//#endregion
export { AmbientStepper };

//# sourceMappingURL=AmbientStepper.mjs.map