/** 팔레트·Logic Expression 공통 — 지표 카테고리 */

export const BAND_INDICATORS = new Set(['MA', 'EMA', 'BOLLINGER', 'DONCHIAN', 'ICHIMOKU']);

export type PaletteIndicatorCategory = 'band' | 'ind';

export function getIndicatorPaletteCategory(indicatorType: string): PaletteIndicatorCategory {
  return BAND_INDICATORS.has(indicatorType) ? 'band' : 'ind';
}

export type LogicOperatorKind = 'and' | 'or' | 'not';

export function logicOperatorKind(type: string): LogicOperatorKind | null {
  if (type === 'AND') return 'and';
  if (type === 'OR') return 'or';
  if (type === 'NOT') return 'not';
  return null;
}
