import { useStyleConfig } from "../core/theme.js";
import { useSidemenuContext } from "./context.js";
import { useEffect, useState } from "react";

//#region src/sidemenu/useSidemenuItem.ts
const useSidemenuItem = (isExpanded) => {
	const [isExpandedVertically, setIsExpandedVertically] = useState(isExpanded);
	const { variant, size, isExpandedHorizontally } = useSidemenuContext();
	const styles = useStyleConfig("Sidemenu", useSidemenuContext);
	useEffect(() => {
		if (isExpanded !== isExpandedVertically) setIsExpandedVertically(isExpanded);
	}, [isExpanded]);
	return {
		isExpandedVertically,
		isDark: variant === "dark",
		size,
		isExpandedHorizontally,
		styles,
		setIsExpandedVertically
	};
};

//#endregion
export { useSidemenuItem as default };
globalThis.__vuiVersion__ = "4.0.0"
//# sourceMappingURL=useSidemenuItem.js.map