import {Color, ColorWithCustomTint} from "./Color";
import {ConditionColorPalette} from "./Colors";
import {getTierCardThemeColor, TierColorPlace} from "./tierColorTheme";

type TierComponentType = 'condition' | 'filter' | 'offer' | 'test' | string

export const getTierCardColor = (
    componentType: TierComponentType,
    options?: {
        conditionPalette?: ConditionColorPalette,
        place?: TierColorPlace,
    }
): Color | ColorWithCustomTint => {
    return getTierCardThemeColor({
        mode: componentType,
        testableType: componentType,
        place: options?.place || 'tier-base',
        inheritedConditionPalette: options?.conditionPalette,
    })
}
