import {
    type ViewStyle,
    type StyleProp,
    type TextStyle
} from "react-native";
import type {
    NCoreUIKitIcon
} from "../../types";

export type ChipDynamicStyleType = {
    displayBehaviourWhileLoading?: ChipDisplayBehaviourWhileLoading;
    customColor?: keyof NCoreUIKit.ContainerContentColors;
    radiuses: NCoreUIKit.ActivePalette["radiuses"];
    spaces: NCoreUIKit.ActivePalette["spaces"];
    colors: NCoreUIKit.ActivePalette["colors"];
    spreadBehaviour?: ChipSpreadBehaviour;
    currentType: ChipTypes;
    isDisabled?: boolean;
    isLoading?: boolean;
    isClosable: boolean;
    size?: ChipSizeType;
    type: ChipType;
};

export type ChipTypes = {
    containerColor: keyof NCoreUIKit.ContainerContentColors;
    titleColor: keyof NCoreUIKit.TextContentColors;
    iconColor: keyof NCoreUIKit.IconContentColors;
};

export type ChipTypeConstantType = {
    type: ChipType;
};

export type ChipType = "primary" | "danger" | "warning" | "neutral" | "success" | "info";

export type ChipDisplayBehaviourWhileLoading = "none" | "disabled";

export type ChipSizeType = "small" | "medium" | "large";

export type ChipSpreadBehaviour = "baseline" | "free";

interface IChipProps {
    displayBehaviourWhileLoading?: ChipDisplayBehaviourWhileLoading;
    titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
    customTheme?: {
        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
        sharpness?: keyof NCoreUIKit.SharpnessKey;
        paletteKey?: keyof NCoreUIKit.PaletteKey;
        themeKey?: keyof NCoreUIKit.ThemeKey;
    };
    style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
    customTitleColor?: keyof NCoreUIKit.TextContentColors;
    customColor?: keyof NCoreUIKit.ContainerContentColors;
    customIconColor?: keyof NCoreUIKit.IconContentColors;
    spreadBehaviour?: ChipSpreadBehaviour;
    icon?: NCoreUIKitIcon;
    isClosable?: boolean;
    isDisabled?: boolean;
    onPress?: () => void;
    isLoading?: boolean;
    size?: ChipSizeType;
    type?: ChipType;
    title?: string;
}
export type {
    IChipProps as default
};
