const require_runtime = require("../../../../../_virtual/_rolldown/runtime.js");
const require_index = require("../components/Title/index.js");
const require_index$1 = require("../components/SubTitle/index.js");
const require_index$2 = require("../components/Price/index.js");
const require_index$3 = require("../components/Tags/index.js");
const require_index$4 = require("../components/MemberPrice/index.js");
const require_index$5 = require("../components/Countdown/index.js");
const require_index$6 = require("../components/Stock/index.js");
const require_index$7 = require("../components/Capacity/index.js");
const require_index$8 = require("../components/Duration/index.js");
const require_index$9 = require("../components/Time/index.js");
const require_index$10 = require("../components/Resource/index.js");
const require_index$11 = require("../components/Promotions/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/plus/productSelect/ProductCard/SkuCard/hooks/useDynamicComponents.ts
const componentMap = {
	title: require_index.default,
	subtitle: require_index$1.default,
	price: require_index$2.default,
	memberPrice: require_index$4.default,
	tags: require_index$3.default,
	countdown: require_index$5.default,
	stock: require_index$6.default,
	capacity: require_index$7.default,
	duration: require_index$8.default,
	time: require_index$9.default,
	resource: require_index$10.default,
	promotions: require_index$11.default
};
const useDynamicComponents = () => {
	const renderComponent = (key, props) => {
		const Component = componentMap[key];
		if (!Component) return null;
		return react.default.createElement(Component, {
			key,
			props
		});
	};
	const renderComponents = (props) => {
		return ((props === null || props === void 0 ? void 0 : props.sortKeys) || []).map((key) => renderComponent(key, props));
	};
	return {
		renderComponent,
		renderComponents,
		componentMap
	};
};
//#endregion
exports.useDynamicComponents = useDynamicComponents;
