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

export type AvatarDynamicStyleType = {
    backgroundColor?: keyof NCoreUIKit.ContainerContentColors | "transparent";
    borderColor?: keyof NCoreUIKit.BorderContentColors | "transparent";
    avatarBackgroundColor: keyof NCoreUIKit.ContainerContentColors;
    statusIndicatorType: AvatarStatusIndicatorType;
    borders: NCoreUIKit.ActivePalette["borders"];
    colors: NCoreUIKit.ActivePalette["colors"];
    isShowStatusIndicatorSplicer?: boolean;
    image?: ComponentType<ImageProps>;
    currentSize: AvatarMeasures;
    isShowBorder?: boolean;
    isDisabled?: boolean;
    isLoading?: boolean;
    imageUrl?: string;
    title?: string;
};

export type AvatarMeasuresKeys = {
    fontSize: keyof NCoreUIKit.Typography;
    statusIndicatorSize: number;
    iconSize: number;
    size: number;
};

export type AvatarMeasures = {
    fontSize: keyof NCoreUIKit.Typography;
    statusIndicatorSize: number;
    iconSize: number;
    size: number;
};

export type AvatarSizeConstantType = {
    spaces: NCoreUIKit.ActivePalette["spaces"];
    size: AvatarSizeType;
};

export type AvatarStatusIndicatorType = "online" | "offline" | "busy" | "away" | "idle";

export type AvatarTitleAbbreviationTypes = "first-last" | "first-next" | "every-first";

export type AvatarSizeType = "xxSmall" | "xSmall" | "small" | "medium" | "large" | "xLarge" | "xxLarge" | "xxxLarge";

interface IAvatarProps {
    backgroundColor?: keyof NCoreUIKit.ContainerContentColors | "transparent";
    borderColor?: keyof NCoreUIKit.BorderContentColors | "transparent";
    avatarBackgroundColor?: keyof NCoreUIKit.ContainerContentColors;
    iconColor?: keyof NCoreUIKit.ProjectColorPalette;
    customTheme?: {
        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
        sharpness?: keyof NCoreUIKit.SharpnessKey;
        paletteKey?: keyof NCoreUIKit.PaletteKey;
        themeKey?: keyof NCoreUIKit.ThemeKey;
    };
    style?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
    titleAbbreviationType?: AvatarTitleAbbreviationTypes;
    statusIndicatorType?: AvatarStatusIndicatorType;
    titleColor?: keyof NCoreUIKit.TextContentColors;
    isShowStatusIndicatorSplicer?: boolean;
    image?: ComponentType<ImageProps>;
    imageSource?: ImageURISource;
    isStatusIndicator?: boolean;
    isWorkWithAction?: boolean;
    imageProps?: ImageProps;
    isShowBorder?: boolean;
    icon?: NCoreUIKitIcon;
    size?: AvatarSizeType;
    isDisabled?: boolean;
    onPress?: () => void;
    isLoading?: boolean;
    imageUrl?: string;
    title?: string;
}
export type {
    IAvatarProps as default
};
