import { t as Icon_default } from "./Icon.js";
import { t as LazyIcon_default } from "./LazyIcon.js";
import { t as isComponent } from "./component.js";
const useIcons = (children) => {
	let leftIcon = null;
	let rightIcon = null;
	const firstChild = children[0];
	if (isComponent(firstChild, Icon_default) || isComponent(firstChild, LazyIcon_default)) {
		leftIcon = firstChild;
		children.shift();
	}
	const lastChild = children[children.length - 1];
	if (isComponent(lastChild, Icon_default) || isComponent(lastChild, LazyIcon_default)) {
		rightIcon = lastChild;
		children.pop();
	}
	const restChildren = children.filter((child) => child);
	return [
		leftIcon,
		rightIcon,
		restChildren.length > 0 ? restChildren : null
	];
};
export { useIcons as t };

//# sourceMappingURL=useIcons.js.map