import { __exportAll } from "../../../_virtual/_rolldown/runtime.mjs";
import { Field } from "../../../utilities/form/Field.mjs";
import { FluentTextFieldAutoComplete } from "../../inputs/textField/FluentTextFieldAutoComplete.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
//#region src/UI/property/widgets/AutoCompletePropertyWidget.jsx
var AutoCompletePropertyWidget_exports = /* @__PURE__ */ __exportAll({ default: () => AutoCompletePropertyWidget });
/**
* `autocomplete` property widget
*
* Outputs a Autocomplete field
*/
const AutoCompletePropertyWidget = (props) => {
	const $ = c(13);
	let extraProps;
	let property;
	let propertyType;
	if ($[0] !== props) {
		const { property: t0, propertyType: t1, initialData, ...t2 } = props;
		property = t0;
		propertyType = t1;
		extraProps = t2;
		$[0] = props;
		$[1] = extraProps;
		$[2] = property;
		$[3] = propertyType;
	} else {
		extraProps = $[1];
		property = $[2];
		propertyType = $[3];
	}
	const { options, valueName, key, label, required } = property;
	let t0;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t0 = { width: "100%" };
		$[4] = t0;
	} else t0 = $[4];
	const t1 = `${propertyType}:${key}`;
	const t2 = `${propertyType}:${key}`;
	const t3 = !!required;
	let t4;
	if ($[5] !== extraProps || $[6] !== label || $[7] !== options || $[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== valueName) {
		t4 = /* @__PURE__ */ React.createElement("div", { style: t0 }, /* @__PURE__ */ React.createElement(Field, {
			component: FluentTextFieldAutoComplete,
			id: t1,
			name: t2,
			label,
			variant: "outlined",
			margin: "dense",
			color: "primary",
			size: "small",
			required: t3,
			fullWidth: true,
			options,
			optionKey: valueName,
			...extraProps
		}));
		$[5] = extraProps;
		$[6] = label;
		$[7] = options;
		$[8] = t1;
		$[9] = t2;
		$[10] = t3;
		$[11] = valueName;
		$[12] = t4;
	} else t4 = $[12];
	return t4;
};
//#endregion
export { AutoCompletePropertyWidget_exports, AutoCompletePropertyWidget as default };

//# sourceMappingURL=AutoCompletePropertyWidget.mjs.map