import { _objectSpread2 } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import React, { forwardRef } from "react";
import * as icons from "@ant-design/icons";
//#region ../materials/src/components/icon/index.tsx
const _excluded = [
	"type",
	"size",
	"color"
];
const createFromIconfontCN = icons.createFromIconfontCN;
const Icon = (props, ref) => {
	const { type = "", size, color } = props, rest = _objectWithoutProperties(props, _excluded);
	const IconComp = (icons || {})[type];
	const style = _objectSpread2(_objectSpread2({}, rest.style), {}, {
		fontSize: size,
		color
	});
	if (!IconComp) {
		const IconFont = createFromIconfontCN();
		return /* @__PURE__ */ React.createElement(IconFont, _objectSpread2(_objectSpread2({ type }, rest), {}, {
			style,
			ref
		}));
	}
	return /* @__PURE__ */ React.createElement(IconComp, _objectSpread2(_objectSpread2({}, rest), {}, {
		style,
		twoToneColor: color,
		ref
	}));
};
var icon_default = forwardRef(Icon);
//#endregion
export { icon_default as default };
