import { ICONS } from '../../constants';
import { useIconColor } from './hooks';
export const useLogic = ({ iconOption, variant, renderIcon, }) => {
    const iconColor = useIconColor({ color: iconOption?.color, renderIcon });
    const { variant: iconOptionVariant = 'fill' } = iconOption || {};
    const getIcon = () => {
        if (renderIcon) {
            return renderIcon();
        }
        const icon = ICONS[variant][iconOptionVariant];
        if (icon) {
            return icon;
        }
        return ICONS.info.fill;
    };
    return { getIcon, iconColor };
};
