/**
 * @since Last modified: 2024-01-18 16:17:08
 * @function nodeState
 * @description Determine the state of the node.
 * @param {getEl} elem - Node or node selector.
 * @returns  {object} - Return state object,include properties:isExist,isVirtual,isHidden and isUncalc.
 * @see {@link https://codepen.io/axui/pen/PoVxWrd|demo @ codepen}
 * @example
 * ax.nodeState('#demo');
 * <!--return { isExist:true, isVirtual:true, isHidden:false, isUncalc: true }-->
 */
'use strict';
import getEl from './getEl';
const nodeState = (elem: any) => {
    let dom = getEl(elem),
        isExist = dom ? true : false,
        isVirtual = isExist && !getComputedStyle(elem).display,
        isHidden = isExist && getComputedStyle(elem).display === 'none';
    return { isExist, isVirtual, isHidden, isUncalc: !isExist || isVirtual || isHidden }
}
export default nodeState;
