import React from 'react';
import { TabsProps } from 'rc-tabs';

export interface TabBarProps extends TabsProps {
  extraContent?: TabsProps['tabBarExtraContent'];
  hideBottomDivider?: boolean;
  onAdd?: () => void;
  onClose?: (key: string) => void;
  tabBarPosition?: TabsProps['tabPosition'];
  tabs: Array<TabProps>;
}

export interface TabProps<IdType extends string = string> {
  component?: React.ReactElement;
  customComponent?: React.ReactElement;
  editable?: boolean;
  hideCloseButton?: boolean;
  id: IdType;
  isActive?: boolean;
  name: string;
  onChangeTab?: (text: string) => void;
  onClose?: (key: string) => void;
  tooltip?: string;
  withPage?: boolean;
  disabled?: boolean;
}
