// src/components/icon/icon.tsx
import { forwardRef } from "react";

// src/components/icon/icon-styles.ts
import styled from "styled-components";
var STROKE_WIDTH_BY_SIZE = {
  12: 1.4,
  14: 1.4,
  16: 1.8,
  18: 1.8,
  20: 1.8,
  24: 1.8
};
var DEFAULT_STROKE_WIDTH = 1.8;
function getStrokeWidth(size) {
  return STROKE_WIDTH_BY_SIZE[size] ?? DEFAULT_STROKE_WIDTH;
}
var IconWrapper = styled.span`
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: ${({ $color }) => $color ?? "currentColor"};
  flex-shrink: 0;
`;

// src/components/icon/icon.tsx
import { jsx } from "react/jsx-runtime";
var DEFAULT_SIZE = 16;
var Icon = forwardRef(function Icon2({ icon: IconComponent, size = DEFAULT_SIZE, color, className, "aria-label": ariaLabel }, ref) {
  return /* @__PURE__ */ jsx(
    IconWrapper,
    {
      ref,
      className,
      $color: color,
      "aria-label": ariaLabel,
      role: ariaLabel ? "img" : void 0,
      children: /* @__PURE__ */ jsx(IconComponent, { width: size, height: size, strokeWidth: getStrokeWidth(size) })
    }
  );
});

export {
  Icon
};
//# sourceMappingURL=chunk-OLJIJYB5.js.map