"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isTabGroup = exports.isTabField = exports.isFieldset = exports.isExpand = exports.isDateRange = void 0;
// Radio fields are different, they cannot be deselected by a user
//   Thereby they _always_ need a value for submission
//
// You can do that through `defaultValue`, or `isRequired: true`

var isFieldset = exports.isFieldset = function isFieldset(field) {
  return field.type === 'fieldset';
};
var isTabGroup = exports.isTabGroup = function isTabGroup(field) {
  return field.type === 'tab-group';
};
var isTabField = exports.isTabField = function isTabField(field) {
  return 'type' in field && field.type === 'tab';
};
var isExpand = exports.isExpand = function isExpand(field) {
  return field.type === 'expand';
};
var isDateRange = exports.isDateRange = function isDateRange(value) {
  return value && value.hasOwnProperty('type') && value.type === 'date-range';
};