/**
 * @since Last modified: 2024-01-18 16:17:08
 * @function getHeights
 * @description Get the values of the vertical direction of the element.
 * @param {getEl} elem - Node or node selector.
 * @returns  {object} - Return values object,include properties:height,paddingTop,paddingBottom,marginTop,marginBottom,borderTopWidth and borderBottomWidth.
 * @see {@link https://codepen.io/axui/pen/oNmVNvm|demo @ codepen}
 * @example
 * ax.getHeights('#demo');
 * <!--return {height,paddingTop,paddingBottom,marginTop,marginBottom,borderTopWidth,borderBottomWidth}-->
 */
'use strict';
import getEl from './getEl';
import style from './style';
const getHeights = (elem) => {
    let target = getEl(elem);
    if (!target) {
        throw new Error('The target node does not exist!');
    }
    let styles = style(target);
    return {
        height: parseInt(styles.height),
        paddingTop: parseInt(styles.paddingTop),
        paddingBottom: parseInt(styles.paddingBottom),
        marginTop: parseInt(styles.marginTop),
        marginBottom: parseInt(styles.marginBottom),
        borderTopWidth: parseInt(styles.borderTopWidth),
        borderBottomWidth: parseInt(styles.borderBottomWidth),
    };
};
export default getHeights;
