import { FluentIconButton } from "../../../UI/inputs/buttons/FluentIconButton.mjs";
import { c } from "react-compiler-runtime";
import React from "react";
import { FormControl, Input, InputAdornment, makeStyles } from "@material-ui/core";
import clsx from "clsx";
import { POIIcon } from "@fluentui/react-icons";
//#region src/maps/openLayerMaps/ui/Position.jsx
const useStyles = makeStyles((theme) => ({
	root: {
		display: "flex",
		flexDirection: "row"
	},
	lat: { marginRight: theme.spacing(2) }
}));
const Position = (props) => {
	const $ = c(34);
	const classes = useStyles();
	const { changeLat, changeLong, value, setPosition } = props;
	const t0 = classes.root;
	const t1 = classes.lat;
	let t2;
	if ($[0] !== classes.margin || $[1] !== classes.textField || $[2] !== classes.withoutLabel) {
		t2 = clsx(classes.margin, classes.withoutLabel, classes.textField);
		$[0] = classes.margin;
		$[1] = classes.textField;
		$[2] = classes.withoutLabel;
		$[3] = t2;
	} else t2 = $[3];
	let t3;
	if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
		t3 = /* @__PURE__ */ React.createElement(InputAdornment, { position: "end" }, "Long");
		$[4] = t3;
	} else t3 = $[4];
	let t4;
	if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
		t4 = { "aria-label": "longitude-input" };
		$[5] = t4;
	} else t4 = $[5];
	let t5;
	if ($[6] !== changeLong || $[7] !== value) {
		t5 = /* @__PURE__ */ React.createElement(Input, {
			id: "longitude",
			value,
			onChange: changeLong,
			endAdornment: t3,
			"aria-describedby": "longitude-input",
			inputProps: t4
		});
		$[6] = changeLong;
		$[7] = value;
		$[8] = t5;
	} else t5 = $[8];
	let t6;
	if ($[9] !== t2 || $[10] !== t5) {
		t6 = /* @__PURE__ */ React.createElement(FormControl, { className: t2 }, t5);
		$[9] = t2;
		$[10] = t5;
		$[11] = t6;
	} else t6 = $[11];
	let t7;
	if ($[12] !== classes.lat || $[13] !== t6) {
		t7 = /* @__PURE__ */ React.createElement("div", { className: t1 }, t6);
		$[12] = classes.lat;
		$[13] = t6;
		$[14] = t7;
	} else t7 = $[14];
	let t8;
	if ($[15] !== classes.margin || $[16] !== classes.textField || $[17] !== classes.withoutLabel) {
		t8 = clsx(classes.margin, classes.withoutLabel, classes.textField);
		$[15] = classes.margin;
		$[16] = classes.textField;
		$[17] = classes.withoutLabel;
		$[18] = t8;
	} else t8 = $[18];
	let t9;
	if ($[19] === Symbol.for("react.memo_cache_sentinel")) {
		t9 = /* @__PURE__ */ React.createElement(InputAdornment, { position: "end" }, "Lat");
		$[19] = t9;
	} else t9 = $[19];
	let t10;
	if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
		t10 = { "aria-label": "latitude-input" };
		$[20] = t10;
	} else t10 = $[20];
	let t11;
	if ($[21] !== changeLat || $[22] !== value) {
		t11 = /* @__PURE__ */ React.createElement(Input, {
			id: "latitude",
			value,
			onChange: changeLat,
			endAdornment: t9,
			"aria-describedby": "latitude-input",
			inputProps: t10
		});
		$[21] = changeLat;
		$[22] = value;
		$[23] = t11;
	} else t11 = $[23];
	let t12;
	if ($[24] !== t11 || $[25] !== t8) {
		t12 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(FormControl, { className: t8 }, t11));
		$[24] = t11;
		$[25] = t8;
		$[26] = t12;
	} else t12 = $[26];
	let t13;
	if ($[27] !== setPosition) {
		t13 = /* @__PURE__ */ React.createElement("div", null, /* @__PURE__ */ React.createElement(FluentIconButton, {
			onClick: setPosition,
			color: "primary",
			icon: POIIcon
		}));
		$[27] = setPosition;
		$[28] = t13;
	} else t13 = $[28];
	let t14;
	if ($[29] !== classes.root || $[30] !== t12 || $[31] !== t13 || $[32] !== t7) {
		t14 = /* @__PURE__ */ React.createElement("div", { className: t0 }, t7, t12, t13);
		$[29] = classes.root;
		$[30] = t12;
		$[31] = t13;
		$[32] = t7;
		$[33] = t14;
	} else t14 = $[33];
	return t14;
};
//#endregion
export { Position as default };

//# sourceMappingURL=Position.mjs.map