"use strict";
exports.__esModule = true;
exports.withDefaultGetters = exports.isNotMultipleParams = exports.isMultipleParams = exports.isGroupValuesParams = exports.defaultGetGroupLabel = exports.defaultGetGroupKey = exports.defaultGetItemDisabled = exports.defaultGetItemGroupKey = exports.defaultGetItemLabel = exports.defaultGetItemKey = void 0;
var tslib_1 = require("tslib");
var defaultGetItemKey = function (item) { return item.id; };
exports.defaultGetItemKey = defaultGetItemKey;
var defaultGetItemLabel = function (item) { return item.label; };
exports.defaultGetItemLabel = defaultGetItemLabel;
var defaultGetItemGroupKey = function (item) { return item.groupId; };
exports.defaultGetItemGroupKey = defaultGetItemGroupKey;
var defaultGetItemDisabled = function (item) { return item.disabled; };
exports.defaultGetItemDisabled = defaultGetItemDisabled;
var defaultGetGroupKey = function (group) { return group.id; };
exports.defaultGetGroupKey = defaultGetGroupKey;
var defaultGetGroupLabel = function (group) { return group.label; };
exports.defaultGetGroupLabel = defaultGetGroupLabel;
var isGroupValuesParams = function (params) {
    return !!params.groupValues;
};
exports.isGroupValuesParams = isGroupValuesParams;
var isMultipleParams = function (params) {
    return !!params.multiple;
};
exports.isMultipleParams = isMultipleParams;
var isNotMultipleParams = function (params) {
    return !params.multiple;
};
exports.isNotMultipleParams = isNotMultipleParams;
function withDefaultGetters(props) {
    return (0, tslib_1.__assign)((0, tslib_1.__assign)({}, props), { getItemLabel: props.getItemLabel || exports.defaultGetItemLabel, getItemKey: props.getItemKey || exports.defaultGetItemKey, getItemGroupKey: props.getItemGroupKey || exports.defaultGetItemGroupKey, getItemDisabled: props.getItemDisabled || exports.defaultGetItemDisabled, getGroupLabel: props.getGroupLabel || exports.defaultGetGroupLabel, getGroupKey: props.getGroupKey || exports.defaultGetGroupKey });
}
exports.withDefaultGetters = withDefaultGetters;
