import MixableComponentArray from "./MixableComponentArray";
import SameComponentArray from "./SameComponentArray";
import type { ISameComponentArrayProps } from "./SameComponentArray";
import type { IMixableComponentArrayProps } from "./MixableComponentArray";

const ComponentArraySelector = (props: ISameComponentArrayProps & IMixableComponentArrayProps): JSX.Element => {
	const { elementUniqueSelection = false } = props;
	const Component = elementUniqueSelection ? SameComponentArray : MixableComponentArray;

	return <Component {...props} />;
};

export default ComponentArraySelector;
