const getMatch = (value, children, search) => {
    if (!search?.length)
        return true;
    const childrenValue = getChildrenValue(children)?.toLowerCase();
    return (value?.toLowerCase().includes(search.toLowerCase()) ||
        childrenValue?.includes(search.toLowerCase()));
};
const getChildrenValue = (children) => {
    if (typeof children === "string")
        return children;
    if (typeof children === "object" && children !== null) {
        return children.toString();
    }
    return null;
};

export { getChildrenValue, getMatch };
//# sourceMappingURL=utils.js.map
