// @flow
import type { TranslatedContent } from '../../../types';
import type { MarginOnlySpaceProps } from '../../../mixins/spacing';
import type { StackeeProps } from '../../../mixins/stackee';
import type { ContainerProps } from '../../../mixins/container';
import type { StylableProps } from '../../../mixins/themes';
import type { TestingProps } from '../../../mixins/testing';
import type { AriaProps } from '../../../mixins/aria';

export type SelectorItemContext = {|
  name: string,
  managedValue?: string | number | string[],
  stateful?: boolean,
  onChange: (SyntheticInputEvent<HTMLElement>) => void,
|};

export type SelectorProps = {|
  ...StylableProps,
  ...TestingProps,
  ...MarginOnlySpaceProps,
  ...StackeeProps,
  ...ContainerProps,
  ...AriaProps,
  name: string,
  type?: 'checkbox' | 'radio',
  onChange: (input: string | number | Array<string>) => void,
  label: TranslatedContent,
  hideLabel?: boolean,
  size?: 'sm' | 'md' | 'lg',
  stateful?: boolean,
  value?: string | Array<string>,
  setManagedValue?: (string | number | Array<string>) => void,
  managedValue?: string | number | Array<string>,
  hasBorder?: boolean,
|};
