"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseRequestParams = parseRequestParams;
// 第三方依赖
const isObject_1 = __importDefault(require("lodash/isObject"));
/**
 * 解析请求参数
 */
function parseRequestParams(params) {
    let clearDataType;
    if ((0, isObject_1.default)(params)) {
        if ('shouldClearData' in params && params.shouldClearData) {
            clearDataType = 'refresh';
        }
        else {
            clearDataType = 'load';
        }
    }
    else {
        clearDataType = params;
    }
    const paramsData = typeof params === 'object' ? params : {};
    return { clearDataType, paramsData };
}
