/**
 * DevExtreme (cjs/common/data/custom-store.js)
 * Version: 23.2.6 (build 24140-0112)
 * Build date: Sun May 19 2024
 *
 * Copyright (c) 2012 - 2024 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
"use strict";
exports.isGroupItemsArray = isGroupItemsArray;
exports.isItemsArray = isItemsArray;
exports.isLoadResultObject = isLoadResultObject;

function isGroupItem(item) {
    if (void 0 === item || null === item || "object" !== typeof item) {
        return false
    }
    return "key" in item && "items" in item
}

function isLoadResultObject(res) {
    return !Array.isArray(res) && "data" in res
}

function isGroupItemsArray(res) {
    return Array.isArray(res) && !!res.length && isGroupItem(res[0])
}

function isItemsArray(res) {
    return Array.isArray(res) && !isGroupItem(res[0])
}
