import { c } from "react-compiler-runtime";
import React from "react";
import PropTypes from "prop-types";
import styles from "./UdpTabPanel.module.css";
//#region src/UI/navigation/tabs/UdpTabPanel.jsx
const UdpTabPanel = (props) => {
	const $ = c(13);
	let children;
	let id;
	let index;
	let otherProps;
	let t0;
	let value;
	if ($[0] !== props) {
		({value, index, children, keepMounted: t0, id, ...otherProps} = props);
		$[0] = props;
		$[1] = children;
		$[2] = id;
		$[3] = index;
		$[4] = otherProps;
		$[5] = t0;
		$[6] = value;
	} else {
		children = $[1];
		id = $[2];
		index = $[3];
		otherProps = $[4];
		t0 = $[5];
		value = $[6];
	}
	const keepMounted = t0 === void 0 ? true : t0;
	const isActive = value === index || value === id;
	if (!keepMounted && !isActive) return null;
	const panelId = id || `tabpanel-${index}`;
	const tabId = `tab-${index}`;
	const t1 = !isActive;
	let t2;
	if ($[7] !== children || $[8] !== otherProps || $[9] !== panelId || $[10] !== t1 || $[11] !== tabId) {
		t2 = /* @__PURE__ */ React.createElement("div", {
			role: "tabpanel",
			id: panelId,
			"aria-labelledby": tabId,
			hidden: t1,
			className: styles.tabPanel,
			...otherProps
		}, children);
		$[7] = children;
		$[8] = otherProps;
		$[9] = panelId;
		$[10] = t1;
		$[11] = tabId;
		$[12] = t2;
	} else t2 = $[12];
	return t2;
};
UdpTabPanel.propTypes = {
	value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
	index: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,
	children: PropTypes.node,
	keepMounted: PropTypes.bool,
	id: PropTypes.string
};
//#endregion
export { UdpTabPanel };

//# sourceMappingURL=UdpTabPanel.mjs.map