import React from 'react';

export interface IPropsButtonsGroup extends React.ComponentProps<any> {
   options: {
      name: string | JSX.Element;
      value?: any;
   }[];
   name: any;
   multiSelection?: boolean;
   allowEmpty?: boolean;
   title?: string;
   onChange?: (value?: any) => void;
}

export function getValue(data: any, multiSelection = false): any {
   if (multiSelection && !(data instanceof Array)) {
      return [];
   }

   return data;
}
