import {
  Icon
} from "./chunk-RWIZ7Q74.js";

// src/components/TextIconAligner.tsx
import { jsx, jsxs } from "@emotion/react/jsx-runtime";
function TextIconAligner({
  text,
  rightIcon,
  leftIcon,
  onClick
}) {
  const leftIconNode = leftIcon ? /* @__PURE__ */ jsx(
    Icon,
    {
      name: leftIcon.name,
      width: leftIcon.lg ? 16 : 12,
      mr: leftIcon.mr || 6,
      color: leftIcon.color
    }
  ) : null;
  const rightIconNode = rightIcon ? /* @__PURE__ */ jsx(
    Icon,
    {
      name: rightIcon.name,
      width: rightIcon.lg ? 16 : 12,
      ml: rightIcon.ml || 6,
      color: rightIcon.color
    }
  ) : null;
  return /* @__PURE__ */ jsxs(
    "span",
    {
      css: {
        cursor: onClick ? "pointer" : "inherit",
        display: "inline-flex",
        alignItems: "center"
      },
      onClick,
      children: [
        leftIconNode,
        text,
        rightIconNode
      ]
    }
  );
}

export {
  TextIconAligner
};
