import { c } from "react-compiler-runtime";
import React, { forwardRef } from "react";
import { TextField, makeStyles } from "@material-ui/core";
//#region src/UI/inputs/textField/FluentTextField.jsx
const useStyles = makeStyles((theme) => ({
	input: {
		borderRadius: 2,
		height: (props) => !props.multiline && !Array.isArray(props.value) && 32,
		padding: (props) => !props.multiline && 0,
		marginTop: 3
	},
	formTextInput: { fontSize: 14 },
	labelRoot: { fontSize: 14 },
	FormControl: {
		display: "none",
		marginTop: 0
	},
	root: {
		marginTop: 25,
		"& .MuiFormLabel-root": {
			marginTop: -27,
			marginLeft: -15
		},
		"& .MuiInputAdornment-root": { paddingLeft: theme.spacing(1) }
	},
	noLabel: { marginTop: theme.spacing(1) }
}));
const FluentTextFieldComponent = (props, ref) => {
	const $ = c(38);
	const classes = useStyles(props);
	let InputProps;
	let endAdornment;
	let id;
	let inputProps;
	let label;
	let startAdornment;
	let udprecordid;
	if ($[0] !== props) {
		({id, label, startAdornment, endAdornment, udprecordid, inputProps, ...InputProps} = props);
		$[0] = props;
		$[1] = InputProps;
		$[2] = endAdornment;
		$[3] = id;
		$[4] = inputProps;
		$[5] = label;
		$[6] = startAdornment;
		$[7] = udprecordid;
	} else {
		InputProps = $[1];
		endAdornment = $[2];
		id = $[3];
		inputProps = $[4];
		label = $[5];
		startAdornment = $[6];
		udprecordid = $[7];
	}
	const t0 = label ? classes.root : classes.noLabel;
	let t1;
	if ($[8] !== classes.label) {
		t1 = { label: classes.label };
		$[8] = classes.label;
		$[9] = t1;
	} else t1 = $[9];
	let t2;
	if ($[10] !== id || $[11] !== inputProps || $[12] !== udprecordid) {
		t2 = {
			id,
			udprecordid,
			...inputProps
		};
		$[10] = id;
		$[11] = inputProps;
		$[12] = udprecordid;
		$[13] = t2;
	} else t2 = $[13];
	const t3 = props.InputProps?.classes;
	let t4;
	if ($[14] !== classes.formTextInput || $[15] !== classes.input || $[16] !== t3) {
		t4 = {
			root: classes.input,
			input: classes.formTextInput,
			...t3
		};
		$[14] = classes.formTextInput;
		$[15] = classes.input;
		$[16] = t3;
		$[17] = t4;
	} else t4 = $[17];
	let t5;
	if ($[18] !== endAdornment || $[19] !== props.InputProps || $[20] !== startAdornment || $[21] !== t4) {
		t5 = {
			classes: t4,
			...props.InputProps,
			...startAdornment,
			...endAdornment
		};
		$[18] = endAdornment;
		$[19] = props.InputProps;
		$[20] = startAdornment;
		$[21] = t4;
		$[22] = t5;
	} else t5 = $[22];
	let t6;
	if ($[23] !== classes.labelFocused || $[24] !== classes.labelRoot) {
		t6 = {
			shrink: false,
			classes: {
				root: classes.labelRoot,
				focused: classes.labelFocused
			}
		};
		$[23] = classes.labelFocused;
		$[24] = classes.labelRoot;
		$[25] = t6;
	} else t6 = $[25];
	let t7;
	if ($[26] !== InputProps || $[27] !== id || $[28] !== label || $[29] !== ref || $[30] !== t1 || $[31] !== t2 || $[32] !== t5 || $[33] !== t6) {
		t7 = /* @__PURE__ */ React.createElement(TextField, {
			...InputProps,
			id,
			variant: "outlined",
			size: "small",
			inputRef: ref,
			margin: "dense",
			label,
			classes: t1,
			inputProps: t2,
			InputProps: t5,
			InputLabelProps: t6
		});
		$[26] = InputProps;
		$[27] = id;
		$[28] = label;
		$[29] = ref;
		$[30] = t1;
		$[31] = t2;
		$[32] = t5;
		$[33] = t6;
		$[34] = t7;
	} else t7 = $[34];
	let t8;
	if ($[35] !== t0 || $[36] !== t7) {
		t8 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t7);
		$[35] = t0;
		$[36] = t7;
		$[37] = t8;
	} else t8 = $[37];
	return t8;
};
const FluentTextField = forwardRef(FluentTextFieldComponent);
//#endregion
export { FluentTextField, FluentTextFieldComponent };

//# sourceMappingURL=FluentTextField.mjs.map