import type { IndicatorCategory } from './indicatorRegistry';

/** 지표 선택 팝업 탭 키 */
export type IndicatorTabKey = IndicatorCategory | 'All' | 'Main';

/** Main 탭 고정 지표 (표시 순서) */
export const MAIN_INDICATOR_TYPES: readonly string[] = [
  'RSI',
  'Stochastic',
  'BollingerBands',
  'IchimokuCloud',
  'ADX',
  'DMI',
  'CCI',
  'MACD',
  'WilliamsPercentRange',
  'TRIX',
  'OBV',
  'VolumeOscillator',
  'VR',
  'Disparity',
  'Psychological',
  'InvestPsychological',
  'SMA',
] as const;

/** Main 탭 전용 표시 라벨 (업비트 주요 지표 명칭) */
export const MAIN_INDICATOR_LABELS: Record<string, { ko: string; en: string }> = {
  RSI:                   { ko: 'RSI (상대강도지수)', en: 'Relative Strength Index' },
  Stochastic:            { ko: 'Stochastic Slow', en: 'Stochastic Slow' },
  BollingerBands:        { ko: '볼린저밴드', en: 'Bollinger Bands' },
  IchimokuCloud:         { ko: '일목균형표', en: 'Ichimoku Cloud' },
  ADX:                   { ko: 'ADX (평균방향성지수)', en: 'Average Directional Index' },
  DMI:                   { ko: 'DMI (방향성이동지수)', en: 'Directional Movement Index' },
  CCI:                   { ko: 'CCI (상품채널지수)', en: 'Commodity Channel Index' },
  MACD:                  { ko: 'MACD (이동평균수렴발산)', en: 'Moving Average Convergence Divergence' },
  WilliamsPercentRange:  { ko: 'Williams %R', en: 'Williams %R' },
  TRIX:                  { ko: 'TRIX', en: 'TRIX' },
  OBV:                   { ko: 'OBV (잔량균형지수)', en: 'On Balance Volume' },
  VolumeOscillator:      { ko: 'Volume Oscillator', en: 'Volume Oscillator' },
  VR:                    { ko: 'VR (거래량비율)', en: 'Volume Ratio' },
  Disparity:             { ko: '이격도', en: 'Disparity' },
  Psychological:         { ko: '심리도', en: 'Psychological Line' },
  InvestPsychological:   { ko: '투자심리도', en: 'Invest Psychological Line' },
  SMA:                   { ko: '단순 이동평균 (MA1~MA11)', en: 'Simple Moving Average' },
};

export function isMainIndicatorType(type: string): boolean {
  return (MAIN_INDICATOR_TYPES as readonly string[]).includes(type);
}
