Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
require("../chunk-BN4qSVkS.cjs");
const require_components_Icon_Icon = require("./Icon/Icon.cjs");
const require_utils_toReactNodes_toReactNodes = require("../utils/toReactNodes/toReactNodes.cjs");
const require_utils_toReactNodes_setReactNodesTypography = require("../utils/toReactNodes/setReactNodesTypography.cjs");
let _emotion_react_jsx_runtime = require("@emotion/react/jsx-runtime");
//#region src/components/TextIconAligner.tsx
function TextIconAligner({ content: contentProp, typography: typographyProp, rightIcon, leftIcon, onClick }) {
	const defaultTypography = {
		type: typographyProp?.type || "Body",
		size: typographyProp?.size || "Small",
		color: typographyProp?.color || "text"
	};
	const content = require_utils_toReactNodes_toReactNodes.toReactNodes(require_utils_toReactNodes_setReactNodesTypography.setDefaultReactNodesTypography(contentProp, {
		default: defaultTypography,
		link: {
			...defaultTypography,
			color: "link"
		}
	}));
	const leftIconNode = leftIcon ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_components_Icon_Icon.Icon, {
		name: leftIcon.name,
		width: leftIcon.width ? leftIcon.width : 12,
		mr: leftIcon.mr || 6,
		color: leftIcon.color
	}) : null;
	const rightIconNode = rightIcon ? /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsx)(require_components_Icon_Icon.Icon, {
		name: rightIcon.name,
		width: rightIcon.width ? rightIcon.width : 12,
		ml: rightIcon.ml || 6,
		color: rightIcon.color
	}) : null;
	return /* @__PURE__ */ (0, _emotion_react_jsx_runtime.jsxs)("span", {
		css: {
			cursor: onClick ? "pointer" : "inherit",
			display: "inline-flex",
			alignItems: "center"
		},
		onClick,
		children: [
			leftIconNode,
			content,
			rightIconNode
		]
	});
}
//#endregion
exports.TextIconAligner = TextIconAligner;
