import {QuantityMeta} from "./Quantity";
import {MinimumCombinedCostOfItemsMeta} from "./MinimumCombinedCostOfItems";
import {colors} from "../Colors";
import {hover} from "../Color";

export const getYUnsupportedComponents = () => [
    QuantityMeta.id,
    MinimumCombinedCostOfItemsMeta.id,
].filter(c => !!c)

export const getAdvancedYCardColor = () => ({
    color: colors.conditionYetanotherpurplishblue,
    tint: (color, type, context, path) => {

        if (context === 'icon-color') {
            return color.text(10)
        }

        if (path?.startsWith('background')) {
            if (context === 'card-background') {
                return `bg-[#f9fafe] ${color.background(hover(30))}`
            }
        } else if (path?.startsWith('border.light.secondary')) {
            return color.border(10)
        } else if (path?.startsWith('border.light.primary')) {
            return color?.border(30)
        }

        if (context === 'icon-background') {
            return color.background(100)
        }

        if (path === 'text.dark.secondary') {
            return color.text(110)
        }

        return 'text-gray-600'
    }
})