// @flow
import React, { type Element } from 'react';

export type SegmentedControlProps = {
  value: string | number,
  onChange: (string | number) => void,
  children: Array<Element<*>>,
};

export type SegmentedControlContextValue = {
  selectedValue: string | number,
  onItemClick: (string | number) => void,
};

export const SegmentedControlContext = React.createContext<SegmentedControlContextValue>(
  {
    selectedValue: 0,
    onItemClick: () => {},
  },
);
