import { jsx } from "react/jsx-runtime";
import { blockIcons } from "./icons.js";
/**
 * A component that displays a block icon.
 *
 * Usage:
 *
 * ```jsx
 * import { BlockIcon } from '@eightshift/frontend-libs/scripts';
 *
 * <BlockIcon iconName='es-button' />
 * ```
 *
 * Output:
 *
 * Selected block icon displayed inline.
 * ```html
 * <i><svg ...> ... </svg></i>
 * ```
 *
 * @param {object} props          - BlockIcon options.
 * @param {string} props.iconName - Name of the block icon to display.
 *
 * @access public
 *
 * @returns {JSX.Element} The BlockIcon component.
 *
 * @preserve
 */
const BlockIcon = (props) => {
  const { iconName } = props;
  return /* @__PURE__ */ jsx(
    "i",
    {
      dangerouslySetInnerHTML: { __html: blockIcons[iconName] },
      style: { lineHeight: 0 }
    }
  );
};
export {
  BlockIcon
};
