"use strict";

require("core-js/modules/es.object.define-property.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FcrPretestDeviceIcon = exports.FcrIconButton = void 0;
var _classnames = _interopRequireDefault(require("classnames"));
var _icon = require("../icon");
var _tooltip = require("../tooltip");
require("./index.css");
var _jsxRuntime = require("react/jsx-runtime");
var FcrIconButton = exports.FcrIconButton = function FcrIconButton(props) {
  var icon = props.icon,
    _props$size = props.size,
    size = _props$size === void 0 ? 'small' : _props$size,
    className = props.className,
    onClick = props.onClick,
    disabled = props.disabled,
    iconColors = props.iconColors;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
    disabled: disabled,
    onClick: onClick,
    className: (0, _classnames["default"])('fcr-clickabel-icon', "fcr-clickable-icon-".concat(size), 'fcr-btn-click-effect', className),
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
      type: icon,
      size: size === 'large' ? 32 : 20,
      colors: iconColors
    })
  });
};
var FcrPretestDeviceIcon = exports.FcrPretestDeviceIcon = function FcrPretestDeviceIcon(props) {
  var status = props.status,
    icon = props.icon,
    onClick = props.onClick,
    className = props.className,
    tooltip = props.tooltip,
    _props$size2 = props.size,
    size = _props$size2 === void 0 ? 'large' : _props$size2;
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
    content: tooltip,
    children: /*#__PURE__*/(0, _jsxRuntime.jsx)(FcrIconButton, {
      onClick: status === 'disabled' ? function () {} : onClick,
      icon: icon,
      size: size,
      className: (0, _classnames["default"])("fcr-pretest-device-icon-".concat(status), className),
      iconColors: {
        iconPrimary: 'var(--fcr_ui_scene_white10)'
      }
    })
  });
};