"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.reactForEach = reactForEach;
exports.reactMap = reactMap;
const react_1 = __importDefault(require("react"));
function reactForEach(children, func) {
    let index = 0;
    react_1.default.Children.forEach(children, (child) => {
        if (react_1.default.isValidElement(child))
            func(child, index++);
    });
}
function reactMap(children, func) {
    let index = 0;
    return react_1.default.Children.map(children, (child) => (react_1.default.isValidElement(child) ? func(child, index++) : child));
}
//# sourceMappingURL=ElementChildren.js.map