import { c } from "react-compiler-runtime";
import React, { forwardRef } from "react";
import { FormControl, InputBase, NativeSelect, Typography, makeStyles, withStyles } from "@material-ui/core";
import PropTypes from "prop-types";
//#region src/UI/inputs/menus/FluentSimpleSelect.jsx
const FluentInput = withStyles((theme) => ({
	root: { "label + &": { marginTop: theme.spacing(1) } },
	input: {
		borderRadius: 2,
		position: "relative",
		border: "1px solid rgba(0, 0, 0, 0.23)",
		fontSize: 14,
		padding: "4px 8px",
		height: 20,
		transition: theme.transitions.create(["border-color", "box-shadow"]),
		"&:focus": { borderRadius: 2 }
	}
}))(InputBase);
const useStyles = makeStyles((theme) => ({ margin: {
	marginTop: theme.spacing(1),
	marginBottom: theme.spacing(1)
} }));
const FluentSimpleSelectComponent = (t0, ref) => {
	const $ = c(16);
	const { label, children, id, value, handleChange, defaultValue } = t0;
	const classes = useStyles();
	let t1;
	if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
		t1 = {
			color: "rgba(0, 0, 0, 0.54)",
			fontWeight: 400,
			letterSpacing: 0
		};
		$[0] = t1;
	} else t1 = $[0];
	let t2;
	if ($[1] !== classes.label || $[2] !== label) {
		t2 = /* @__PURE__ */ React.createElement(Typography, {
			className: classes.label,
			style: t1
		}, label);
		$[1] = classes.label;
		$[2] = label;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = /* @__PURE__ */ React.createElement(FluentInput, null);
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] !== children || $[6] !== defaultValue || $[7] !== handleChange || $[8] !== id || $[9] !== ref || $[10] !== value) {
		t4 = /* @__PURE__ */ React.createElement(NativeSelect, {
			id,
			inputRef: ref,
			value,
			onChange: handleChange,
			defaultValue,
			input: t3,
			noShrink: "true"
		}, children);
		$[5] = children;
		$[6] = defaultValue;
		$[7] = handleChange;
		$[8] = id;
		$[9] = ref;
		$[10] = value;
		$[11] = t4;
	} else t4 = $[11];
	let t5;
	if ($[12] !== classes.margin || $[13] !== t2 || $[14] !== t4) {
		t5 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(FormControl, { className: classes.margin }, t2, t4));
		$[12] = classes.margin;
		$[13] = t2;
		$[14] = t4;
		$[15] = t5;
	} else t5 = $[15];
	return t5;
};
FluentSimpleSelectComponent.propTypes = {
	label: PropTypes.string,
	children: PropTypes.node,
	handleChange: PropTypes.func,
	value: PropTypes.string
};
const FluentSimpleSelect = forwardRef(FluentSimpleSelectComponent);
//#endregion
export { FluentSimpleSelect };

//# sourceMappingURL=FluentSimpleSelect.mjs.map