import { TYPE } from "./constants";
import { Hex, ChannelParams, ShadeOption, ShadeFactorsSet } from "./types";

export interface RawHSL {
  type: TYPE.HSL;
  h: number;
  s: number;
  l: number;
}
//  VERSION 2 TYPES START HERE
export interface RawChannelParams {
  type: TYPE.CHANNEL_PARAMS;
  channel: string;
  useBounds?: boolean;
  upperboundDivider?: number;
  lowerboundDivider?: number;
  upperboundPadding?: number;
  lowerboundPadding?: number;
}
// to replace ThemeOptionWithName, ThemeOption, and ThemeOptions
export interface RawShadeOption {
  type: TYPE.SHADE_OPTION;
  optionName: string;
  hex: Hex;
  generateShades: boolean; // default is true, set to false for solid colour
  channelParams?: ChannelParams[]; // if provided by user, apply user's custom channel params, if not use default params
}
export interface RawShadeFactorsSet {
  type: TYPE.SHADE_FACTORS_SET;
  setName: string;
  shadeFactors: {
    [shadeFactorName: string]: number;
  };
}
export interface RawShadesSet {
  type: TYPE.SHADES_SET;
  setName: string;
  shades: {
    [shadeName: string]: Hex;
  };
}
export interface RawUseThemerProp {
  type: TYPE.USE_THEMER_PROP;
  shadeOptions?: ShadeOption[];
  shadeFactorsSets?: ShadeFactorsSet[];
}
