import { h } from './core-80b5cb25.js';
import { _ } from './lodash-62c1633d.js';

function constructIcon(displayIcon, iconOptions) {
    if (iconOptions) {
        iconOptions = _.cloneDeep(iconOptions);
        const iconStyle = {
            width: iconOptions.width,
            height: iconOptions.height
        };
        delete iconOptions.width;
        delete iconOptions.height;
        return {
            displayIcon,
            iconElm: h("img", Object.assign({}, iconOptions, { style: iconStyle }))
        };
    }
    else {
        return { displayIcon: false, iconElm: null };
    }
}

export { constructIcon as c };
