/**
 * @since Last modified: 2024/04/20 14:44:58
 * @function style
 * @description obtaining styles collection (getComputeDStyle method) with calculation.
 * @param {getEl} elem  - Node of style.
 * @param {getEl} [pseudo]  - A string specifying the pseudo-element to match.
 * @returns {object}  - Return styles collection.
 * @see {@link https://codepen.io/axui/pen/XWOOwLZ|demo @ codepen}
 * @example
 * ax.style('#demo');
 * <!--return a CSSStyleDeclaration object-->
 */




'use strict';
import { T_sel } from '../../../types/ax';
import getEl from './getEl';
const style = (elem: T_sel, pseudo?: any): CSSStyleDeclaration => {
    let el = getEl(elem),
        result = el ? (document.defaultView as any).getComputedStyle(el, pseudo) : {};
    return result;
}
export default style;
