/**
 * @since Last modified: 2024/04/20 14:39:01
 * @function createModule
 * @param {string} attr  - one attribute of element.
 * @param {string} value  - The value corresponding to the attribute.
 * @param {array} map  - The options map.
 * @returns {Object} - Return a object.
 * @see {@link https://codepen.io/axui/pen/KKJQRwG|demo @ codepen}
 * @example
 * ax.createModule('length','30');
 * <!--return {length:30}-->
 */
'use strict';
import { T_obj, T_sel } from "../../../types/ax";
import ax from "../ax";
import PubBase from "../modules/PubBase";
import PubCommon from "../modules/PubCommon";
import PubListen from "../modules/PubListen";
import PubUpdate from "../modules/PubUpdate";
import deepClone from "./deepClone";
import elProps from "./elProps";
import getEl from "./getEl";
import getOptsFromMap from "./getOptsFromMap";
import instance from "./instance";
import pipe from "./pipe";
const createModule = ({ name, maps = [], ready, members = {}, methods = {}, host = true, component = true }: { name: string, maps: T_obj[], ready?: any, members?: T_obj, methods?: T_obj, host?: boolean, component?: boolean }) => {
    ax[name] = class extends pipe(PubListen, PubUpdate, PubCommon)(PubBase) {
        moduleName = name;
        constructor() {
            super();
            Object.assign(this, members);
        }
    };
    Object.assign(ax[name].prototype, methods);
}
export default createModule;
