/* index.tsx generated by @compiled/babel-plugin v0.38.1 */
import "./index.compiled.css";
import * as React from 'react';
import { ax, ix } from "@compiled/react/runtime";
import { fg } from '@atlaskit/platform-feature-flags';
import { SmartLinkSize } from '../../../../../../constants';
const getIconWidth = size => {
  switch (size) {
    case SmartLinkSize.XLarge:
    case SmartLinkSize.Large:
      return '1.5rem';
    case SmartLinkSize.Medium:
    case SmartLinkSize.Small:
    default:
      return '1rem';
  }
};

// TODO: Remove on fg cleanup: platform-visual-refresh-icons
const iconSizeStyleMap = {
  '1.5rem': "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1k8s _1tke1k8s _c71l1k8s _1bsb1k8s _1ul91k8s _p12f1k8s _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71k8s _1xjx1k8s _17521k8s _qci81k8s _15iz1k8s _erub1k8s _19l31k8s _1pr21k8s _1u5t1k8s _mezj1k8s _e2oo1k8s _w8l51k8s _1rg21k8s _q7cv1k8s _xwbj1k8s _rtys1k8s _b8nk1k8s _4x201k8s",
  '1rem': "_16jlidpf _1o9zidpf _i0dl1wug _4t3i1j6v _1tke1j6v _c71l1j6v _1bsb1j6v _1ul91j6v _p12f1j6v _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna71j6v _1xjx1j6v _17521j6v _qci81j6v _15iz1j6v _erub1j6v _19l31j6v _1pr21j6v _1u5t1j6v _mezj1j6v _e2oo1j6v _w8l51j6v _1rg21j6v _q7cv1j6v _xwbj1j6v _rtys1j6v _b8nk1j6v _4x201j6v",
  '20px': "_16jlidpf _1o9zidpf _i0dl1wug _4t3igktf _1tkegktf _c71lgktf _1bsbgktf _1ul9gktf _p12fgktf _i2i3idpf _uhasidpf _5jw9idpf _7wy9idpf _bna7gktf _1xjxgktf _1752gktf _qci8gktf _15izgktf _erubgktf _19l3gktf _1pr2gktf _1u5tgktf _mezjgktf _e2oogktf _w8l5gktf _1rg2gktf _q7cvgktf _xwbjgktf _rtysgktf _b8nkgktf _4x20gktf"
};

// TODO: Remove on fg cleanup: platform-visual-refresh-icons
const stackItemIconStylesOld = null;
const stackItemIconStylesCompiled = null;
const ActionIcon = ({
  size,
  testId,
  icon,
  asStackItemIcon
}) => {
  if (!fg('platform-visual-refresh-icons')) {
    return /*#__PURE__*/React.createElement("span", {
      "data-testid": `${testId}-icon`,
      className: ax([asStackItemIcon && "_1e0c1o8l _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o", asStackItemIcon && iconSizeStyleMap['20px'], !asStackItemIcon && iconSizeStyleMap[getIconWidth(size)]])
    }, icon);
  }
  return /*#__PURE__*/React.createElement("span", {
    "data-testid": `${testId}-icon`,
    className: ax(["_1e0c1o8l"])
  }, icon);
};
export default ActionIcon;