/**
 * @since Last modified: 2024-07-20 19:55:50
 * @function getTransformMatrix
 * @description Get the transform matrix values from the element's style..
 * @param {getEl} elem - Target selector.
 * @returns {array} - Return matrix values.
 * @see {@link https://codepen.io/axui/pen/rNEeGjx|demo @ codepen}
 * @example
 * ax.getTransformMatrix('#demo');
 * <!--return [1, 0, 0, 1, 0, 0]-->
 */
'use strict';
import { T_sel } from "../../../types/ax";
import getEl from "./getEl";
import style from "./style";
const getTransformMatrix = (elem: T_sel) => {
    let el = getEl(elem);
    if (!el) return;
    let value = style(el).transform;
    return (value === 'none') ? [1, 0, 0, 1, 0, 0] : value.replace(/[^0-9.\-,]/g, '').split(',').map(k => Number(k));
}
export default getTransformMatrix;
