// 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`

export const isFieldset = field => {
  return field.type === 'fieldset';
};
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
export const isTabGroup = field => {
  return field.type === 'tab-group';
};
// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @atlaskit/volt-strict-mode/no-multiple-exports
export const isTabField = field => {
  return 'type' in field && field.type === 'tab';
};
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
export const isExpand = field => {
  return field.type === 'expand';
};

// Ignored via go/ees005
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @atlaskit/volt-strict-mode/no-multiple-exports
export const isDateRange = value => {
  return value && value.hasOwnProperty('type') && value.type === 'date-range';
};