import { __assign } from "tslib";
import { alipayComponent } from 'functional-mini/component';
function removeNullProps(props) {
    var newProps = {};
    for (var key in props) {
        if (props[key] !== null) {
            newProps[key] = props[key];
        }
    }
    return newProps;
}
export function mountComponent(Hooks, defaultProps) {
    Component(alipayComponent(Hooks, removeNullProps(mergeDefaultProps(defaultProps))));
}
function mergeDefaultProps(defaultProps) {
    if (defaultProps === void 0) { defaultProps = {}; }
    return __assign({}, defaultProps);
}
