"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setSize = exports.removeSubComponent = exports.removeSubComponentChildren = exports.appendSubComponentChildren = exports.setSubComponentChildren = exports.setSubComponent = exports.SET_SIZE = exports.REMOVE_SUB_COMPONENT = exports.REMOVE_SUB_COMPONENT_CHILDREN = exports.APPEND_SUB_COMPONENT_CHILDREN = exports.SET_SUB_COMPONENT_CHILDREN = exports.SET_SUB_COMPONENT = void 0;
exports.SET_SUB_COMPONENT = 'COMPONENT_SET_SUB_COMPONENT';
exports.SET_SUB_COMPONENT_CHILDREN = 'COMPONENT_SET_SUB_COMPONENT_CHILDREN';
exports.APPEND_SUB_COMPONENT_CHILDREN = 'COMPONENT_APPEND_SUB_COMPONENT_CHILDREN';
exports.REMOVE_SUB_COMPONENT_CHILDREN = 'COMPONENT_REMOVE_SUB_COMPONENT_CHILDREN';
exports.REMOVE_SUB_COMPONENT = 'COMPONENT_REMOVE_SUB_COMPONENT';
exports.SET_SIZE = 'COMPONENT_SET_SIZE';
const setSubComponent = (id, spec) => {
    return {
        type: exports.SET_SUB_COMPONENT,
        data: {
            id,
            spec,
        },
    };
};
exports.setSubComponent = setSubComponent;
const setSubComponentChildren = (id, children) => {
    return {
        type: exports.SET_SUB_COMPONENT,
        data: {
            id,
            children,
        },
    };
};
exports.setSubComponentChildren = setSubComponentChildren;
const appendSubComponentChildren = (id, children) => {
    return {
        type: exports.APPEND_SUB_COMPONENT_CHILDREN,
        data: {
            id,
            children,
        },
    };
};
exports.appendSubComponentChildren = appendSubComponentChildren;
const removeSubComponentChildren = (id, children) => {
    return {
        type: exports.REMOVE_SUB_COMPONENT_CHILDREN,
        data: {
            id,
            children,
        },
    };
};
exports.removeSubComponentChildren = removeSubComponentChildren;
const removeSubComponent = (id) => {
    return {
        type: exports.REMOVE_SUB_COMPONENT,
        data: {
            id,
        },
    };
};
exports.removeSubComponent = removeSubComponent;
const setSize = (id, width, height) => {
    return {
        type: exports.SET_SIZE,
        data: {
            id,
            width,
            height,
        },
    };
};
exports.setSize = setSize;
//# sourceMappingURL=component.js.map