"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useLogic = void 0;
const constants_1 = require("../../constants");
const hooks_1 = require("./hooks");
const useLogic = ({ iconOption, variant, renderIcon, }) => {
    const iconColor = (0, hooks_1.useIconColor)({ color: iconOption?.color, renderIcon });
    const { variant: iconOptionVariant = 'fill' } = iconOption || {};
    const getIcon = () => {
        if (renderIcon) {
            return renderIcon();
        }
        const icon = constants_1.ICONS[variant][iconOptionVariant];
        if (icon) {
            return icon;
        }
        return constants_1.ICONS.info.fill;
    };
    return { getIcon, iconColor };
};
exports.useLogic = useLogic;
