"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsyncC = exports.AsyncCRef = exports.AsyncCWatch = exports.AsyncCCall = exports.AsyncCGet = void 0;
const _component_1 = require("../../../component/$component");
const fromUnitBundle_1 = require("../../../spec/fromUnitBundle");
const AsyncCGet = (c) => {
    return {
        $hasChild(data, callback) {
            return (0, _component_1.$hasChild)(c, data, callback);
        },
        $child(data, callback) {
            return (0, _component_1.$child)(c, data, callback);
        },
        $children(data, callback) {
            return (0, _component_1.$children)(c, data, callback);
        },
        $getAnimations(data, callback) {
            return (0, _component_1.$getAnimations)(c, data, callback);
        },
        $getSetup(data, callback) {
            return (0, _component_1.$getSetup)(c, data, callback);
        },
    };
};
exports.AsyncCGet = AsyncCGet;
const AsyncCCall = (c) => {
    return {
        $appendChild({ bundle }, callback) {
            const Class = (0, fromUnitBundle_1.fromUnitBundle)(bundle, c.__system.specs, c.__system.classes);
            (0, _component_1.$appendChild)(c, Class, callback);
        },
        $removeChild(data, callback) {
            return (0, _component_1.$removeChild)(c, data, callback);
        },
    };
};
exports.AsyncCCall = AsyncCCall;
const AsyncCWatch = (c) => {
    return {};
};
exports.AsyncCWatch = AsyncCWatch;
const AsyncCRef = (c) => {
    return {
        $refChild(data) {
            return (0, _component_1.$refChild)(c, data);
        },
        $refRoot(data) {
            return (0, _component_1.$refRoot)(c, data);
        },
        $refParentRoot(data) {
            return (0, _component_1.$refRoot)(c, data);
        },
    };
};
exports.AsyncCRef = AsyncCRef;
const AsyncC = (c) => {
    return {
        ...(0, exports.AsyncCGet)(c),
        ...(0, exports.AsyncCCall)(c),
        ...(0, exports.AsyncCWatch)(c),
        ...(0, exports.AsyncCRef)(c),
    };
};
exports.AsyncC = AsyncC;
//# sourceMappingURL=AsyncC.js.map