import { FluentTextField } from "../textField/FluentTextField.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { makeStyles } from "@material-ui/core";
import Autocomplete from "@material-ui/lab/Autocomplete";
//#region src/UI/inputs/menus/FluentSelectMenu.jsx
const useStyles = makeStyles((theme) => ({ root: { "&[class*=\"MuiOutlinedInput-root\"][class*=\"MuiOutlinedInput-marginDense\"]": { padding: "4px 8px" } } }));
const FluentSelectMenu = (t0) => {
	const $ = c(27);
	let autoCompleteProps;
	let data;
	let displayProperty;
	let id;
	let onChangeProp;
	let otherProps;
	let t1;
	if ($[0] !== t0) {
		({data, id, onChange: onChangeProp, width: t1, autoCompleteProps, displayProperty, ...otherProps} = t0);
		$[0] = t0;
		$[1] = autoCompleteProps;
		$[2] = data;
		$[3] = displayProperty;
		$[4] = id;
		$[5] = onChangeProp;
		$[6] = otherProps;
		$[7] = t1;
	} else {
		autoCompleteProps = $[1];
		data = $[2];
		displayProperty = $[3];
		id = $[4];
		onChangeProp = $[5];
		otherProps = $[6];
		t1 = $[7];
	}
	const width = t1 === void 0 ? 300 : t1;
	const classes = useStyles();
	let t2;
	if ($[8] !== onChangeProp) {
		t2 = (e, value) => onChangeProp?.(value);
		$[8] = onChangeProp;
		$[9] = t2;
	} else t2 = $[9];
	const onChange = t2;
	let t3;
	if ($[10] !== classes.root) {
		t3 = { inputRoot: classes.root };
		$[10] = classes.root;
		$[11] = t3;
	} else t3 = $[11];
	let t4;
	if ($[12] !== displayProperty) {
		t4 = (option) => displayProperty ? option[displayProperty] ? option[displayProperty] : "" : _temp;
		$[12] = displayProperty;
		$[13] = t4;
	} else t4 = $[13];
	let t5;
	if ($[14] !== width) {
		t5 = { width };
		$[14] = width;
		$[15] = t5;
	} else t5 = $[15];
	let t6;
	if ($[16] !== otherProps) {
		t6 = (params) => /* @__PURE__ */ React.createElement(FluentTextField, {
			...otherProps,
			...params
		});
		$[16] = otherProps;
		$[17] = t6;
	} else t6 = $[17];
	let t7;
	if ($[18] !== autoCompleteProps || $[19] !== data || $[20] !== id || $[21] !== onChange || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== t6) {
		t7 = /* @__PURE__ */ React.createElement(Autocomplete, {
			classes: t3,
			id,
			onChange,
			options: data,
			getOptionLabel: t4,
			style: t5,
			...autoCompleteProps,
			renderInput: t6
		});
		$[18] = autoCompleteProps;
		$[19] = data;
		$[20] = id;
		$[21] = onChange;
		$[22] = t3;
		$[23] = t4;
		$[24] = t5;
		$[25] = t6;
		$[26] = t7;
	} else t7 = $[26];
	return t7;
};
function _temp(option_0) {
	return option_0;
}
//#endregion
export { FluentSelectMenu };

//# sourceMappingURL=FluentSelectMenu.mjs.map