import { jsx as t, jsxs as I } from "react/jsx-runtime";
import { mr0_5 as b, ml0_5 as j, alignItemsCenter as x, dFlex as g } from "./index-general.module.js";
import { classNames as a } from "./index-classNames.js";
import { Icon as k } from "./index-Icon.js";
import "react";
import n from "./index-CtaWithIcon.module.scss.js";
const H = (m) => {
  const {
    position: c,
    icon: o,
    iconColor: f,
    rotateIcon: p = !1,
    className: d,
    disabled: r = !1,
    children: u,
    onClick: l
  } = m, C = (e) => {
    r || l && l(e);
  }, s = (e) => {
    const {
      iconType: i,
      className: y
    } = e;
    return i ? t(k, {
      className: a(y, n.icon, p ? n.rotateIcon : void 0),
      color: f ?? (r ? "var(--n300)" : "var(--brand-color)"),
      children: i
    }) : null;
  }, N = typeof o == "object" ? o : t(s, {
    className: b,
    iconType: o
  }), h = typeof o == "object" ? o : t(s, {
    className: j,
    iconType: o
  });
  return I("div", {
    onClick: C,
    className: a(g, x, d, n.container, r ? n.disabled : ""),
    children: [c == "left" ? N : null, u, c == "right" ? h : null]
  });
};
export {
  H as CtaWithIcon
};
