"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AdaptableIconComponent = void 0;
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const Icon_1 = require("../../../components/Icon");
const useCustomIcon_1 = require("./useCustomIcon");
/**
 * This is a connected componnet.
 * It needs to be used only inside adaptable context.
 */
const AdaptableIconComponent = (props) => {
    const icon = (0, useCustomIcon_1.useCustomIcon)(props.icon);
    return React.createElement(Icon_1.IconComponent, { ...props, icon: icon });
};
exports.AdaptableIconComponent = AdaptableIconComponent;
