export enum CommonSelectOptions {
  Any = "ANY",
}
export type CommonOptionType<T = string> = T | CommonSelectOptions;

export enum SegmentOptionVariant {
  Warning = "warning",
}
export interface SelectOption<
  T extends unknown = string,
> {
  groupName?: string;
  index?: number;
  label: string;
  tags?: string[];
  value: T;
  variant?: SegmentOptionVariant;
}

export interface SelectFilter<
  OptionType extends unknown,
  FilterType extends string = string
> {
  allOptionLabel?: string;
  label: string;
  options: SelectOption<FilterType>[];
  selectedValue?: FilterType;
  filter: (
    options: SelectOption<OptionType>[],
    selectedValue: FilterType,
  ) => SelectOption<OptionType>[];
}
