/**
 * @since Last modified: 2023-12-11 22:38:12
 * @constant mixinClass
 * @description Obtain the child class after extended.Can extend circulating.
 * @property {function} [parent] - The parent class
 * @returns {function} - The child class after extended.
 * @see {@link https://codepen.io/axui/pen/eYxoZzp|demo @ codepen}
 * @example
 * class demo extended ax.mixinClass(parent) {};
 */
'use strict';
import pipe from "./pipe";
const mixinClass = (...parents: any) => {
    let len = parents.length,
        result: any,
        mixin = (k: any) => {
            return class extends (k || class Empty {}) {
                /*  constructor() {
                     super();
                 } */
            }
        }
    if (len > 1) {
        let mixins = parents.map((k: any) => mixin(k));console.log(mixins)
        result = pipe(...mixins)(class Empty {});
    } else {
        result = mixin(parents[0]);
    }
    return result;
}
export default mixinClass;
