import { c } from "react-compiler-runtime";
import * as React$1 from "react";
import { Typography, withStyles } from "@material-ui/core";
import clsx from "clsx";
import PropTypes from "prop-types";
//#region src/UI/inputs/menus/AmbientStepper/StepLabel.jsx
const styles = (theme) => ({
	root: {
		display: "flex",
		alignItems: "center",
		"&$alternativeLabel": { flexDirection: "column" },
		"&$disabled": { cursor: "default" }
	},
	horizontal: {},
	vertical: {},
	label: {
		color: theme.palette.text.secondary,
		"&$active": {
			color: theme.palette.text.primary,
			fontWeight: 500
		},
		"&$completed": {
			color: theme.palette.text.primary,
			fontWeight: 500
		},
		"&$alternativeLabel": { textAlign: "center" },
		"&$error": { color: theme.palette.error.main }
	},
	active: {},
	completed: {},
	error: {},
	disabled: {},
	iconContainer: {
		flexShrink: 0,
		display: "flex",
		paddingRight: 8,
		"&$alternativeLabel": { paddingRight: 0 }
	},
	alternativeLabel: {},
	labelContainer: { width: "100%" }
});
const StepLabel$1 = React$1.forwardRef(function StepLabel(props, ref) {
	const $ = c(56);
	let StepIconComponentProp;
	let StepIconProps;
	let children;
	let className;
	let classes;
	let icon;
	let optional;
	let other;
	let t0;
	let t1;
	let t2;
	let t3;
	let t4;
	let t5;
	if ($[0] !== props) {
		const { active: t6, alternativeLabel: t7, children: t8, classes: t9, className: t10, completed: t11, disabled: t12, error: t13, expanded, icon: t14, last, optional: t15, orientation: t16, StepIconComponent: t17, StepIconProps: t18, ...t19 } = props;
		t0 = t6;
		t1 = t7;
		children = t8;
		classes = t9;
		className = t10;
		t2 = t11;
		t3 = t12;
		t4 = t13;
		icon = t14;
		optional = t15;
		t5 = t16;
		StepIconComponentProp = t17;
		StepIconProps = t18;
		other = t19;
		$[0] = props;
		$[1] = StepIconComponentProp;
		$[2] = StepIconProps;
		$[3] = children;
		$[4] = className;
		$[5] = classes;
		$[6] = icon;
		$[7] = optional;
		$[8] = other;
		$[9] = t0;
		$[10] = t1;
		$[11] = t2;
		$[12] = t3;
		$[13] = t4;
		$[14] = t5;
	} else {
		StepIconComponentProp = $[1];
		StepIconProps = $[2];
		children = $[3];
		className = $[4];
		classes = $[5];
		icon = $[6];
		optional = $[7];
		other = $[8];
		t0 = $[9];
		t1 = $[10];
		t2 = $[11];
		t3 = $[12];
		t4 = $[13];
		t5 = $[14];
	}
	const active = t0 === void 0 ? false : t0;
	const alternativeLabel = t1 === void 0 ? false : t1;
	const completed = t2 === void 0 ? false : t2;
	const disabled = t3 === void 0 ? false : t3;
	const error = t4 === void 0 ? false : t4;
	const orientation = t5 === void 0 ? "horizontal" : t5;
	const StepIconComponent = StepIconComponentProp;
	const t6 = classes[orientation];
	let t7;
	if ($[15] !== alternativeLabel || $[16] !== className || $[17] !== classes.alternativeLabel || $[18] !== classes.disabled || $[19] !== classes.error || $[20] !== classes.root || $[21] !== disabled || $[22] !== error || $[23] !== t6) {
		t7 = clsx(classes.root, t6, {
			[classes.disabled]: disabled,
			[classes.alternativeLabel]: alternativeLabel,
			[classes.error]: error
		}, className);
		$[15] = alternativeLabel;
		$[16] = className;
		$[17] = classes.alternativeLabel;
		$[18] = classes.disabled;
		$[19] = classes.error;
		$[20] = classes.root;
		$[21] = disabled;
		$[22] = error;
		$[23] = t6;
		$[24] = t7;
	} else t7 = $[24];
	let t8;
	if ($[25] !== StepIconComponent || $[26] !== StepIconProps || $[27] !== active || $[28] !== alternativeLabel || $[29] !== classes.alternativeLabel || $[30] !== classes.iconContainer || $[31] !== completed || $[32] !== error || $[33] !== icon) {
		t8 = icon || StepIconComponent ? /* @__PURE__ */ React$1.createElement("span", { className: clsx(classes.iconContainer, { [classes.alternativeLabel]: alternativeLabel }) }, /* @__PURE__ */ React$1.createElement(StepIconComponent, {
			completed,
			active,
			error,
			icon,
			...StepIconProps
		})) : null;
		$[25] = StepIconComponent;
		$[26] = StepIconProps;
		$[27] = active;
		$[28] = alternativeLabel;
		$[29] = classes.alternativeLabel;
		$[30] = classes.iconContainer;
		$[31] = completed;
		$[32] = error;
		$[33] = icon;
		$[34] = t8;
	} else t8 = $[34];
	let t9;
	if ($[35] !== active || $[36] !== alternativeLabel || $[37] !== children || $[38] !== classes.active || $[39] !== classes.alternativeLabel || $[40] !== classes.completed || $[41] !== classes.error || $[42] !== classes.label || $[43] !== completed || $[44] !== error) {
		t9 = children ? /* @__PURE__ */ React$1.createElement(Typography, {
			variant: "body2",
			component: "span",
			display: "block",
			className: clsx(classes.label, {
				[classes.alternativeLabel]: alternativeLabel,
				[classes.completed]: completed,
				[classes.active]: active,
				[classes.error]: error
			})
		}, children) : null;
		$[35] = active;
		$[36] = alternativeLabel;
		$[37] = children;
		$[38] = classes.active;
		$[39] = classes.alternativeLabel;
		$[40] = classes.completed;
		$[41] = classes.error;
		$[42] = classes.label;
		$[43] = completed;
		$[44] = error;
		$[45] = t9;
	} else t9 = $[45];
	let t10;
	if ($[46] !== classes.labelContainer || $[47] !== optional || $[48] !== t9) {
		t10 = /* @__PURE__ */ React$1.createElement("span", { className: classes.labelContainer }, t9, optional);
		$[46] = classes.labelContainer;
		$[47] = optional;
		$[48] = t9;
		$[49] = t10;
	} else t10 = $[49];
	let t11;
	if ($[50] !== other || $[51] !== ref || $[52] !== t10 || $[53] !== t7 || $[54] !== t8) {
		t11 = /* @__PURE__ */ React$1.createElement("span", {
			className: t7,
			ref,
			...other
		}, t8, t10);
		$[50] = other;
		$[51] = ref;
		$[52] = t10;
		$[53] = t7;
		$[54] = t8;
		$[55] = t11;
	} else t11 = $[55];
	return t11;
});
StepLabel$1.propTypes = {
	children: PropTypes.node,
	classes: PropTypes.object,
	className: PropTypes.string,
	disabled: PropTypes.bool,
	error: PropTypes.bool,
	icon: PropTypes.node,
	optional: PropTypes.node,
	StepIconComponent: PropTypes.elementType,
	StepIconProps: PropTypes.object
};
StepLabel$1.muiName = "StepLabel";
/**
* Explicit any export to avoid non-portable inferred React types in declaration output.
* @type {any}
*/
const StepLabelExport = withStyles(styles, { name: "MuiStepLabel" })(StepLabel$1);
//#endregion
export { StepLabelExport as default };

//# sourceMappingURL=StepLabel.mjs.map