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

export type SnackBarDynamicStyleType = {
    radiuses: NCoreUIKit.ActivePalette["radiuses"];
    spaces: NCoreUIKit.ActivePalette["spaces"];
    colors: NCoreUIKit.ActivePalette["colors"];
    isInlineSafeArea?: boolean;
    currentType: SnackBarTypes;
    isFullWidth?: boolean;
    safeAreaTop: number;
    type: SnackBarType;
};

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

export type SnackBarTypeConstantType = {
    type: SnackBarType;
};

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

export type SnackBarInternalProps = {
    contentContainerStyle?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
    style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
    action?: {
        onPress: (props: {
            closeAnimation: (props: {
                onClosed?: (props: {
                    id: string;
                }) => void;
            }) => void;
        }) => void;
        icon?: NCoreUIKitIcon;
        style?: ViewStyle;
        title?: string;
    };
    isCloseOnPressActionButton?: boolean;
    closeAnimationDelay?: number;
    openAnimationDelay?: number;
    isInlineSafeArea?: boolean;
    isCloseOnPress?: boolean;
    autoCloseDelay?: number;
    isShowAction?: boolean;
    isFullWidth?: boolean;
    icon?: NCoreUIKitIcon;
    children?: ReactNode;
    type?: SnackBarType;
    onPress?: (props: {
        id: string;
    }) => void;
    subTitle?: string;
    title: string;
    id: string;
    onClosed?: (props: {
        id: string;
    }) => void;
    customTheme?: {
        gapPropagation?: NCoreUIKit.GapPropagationKey;
        sharpness?: NCoreUIKit.SharpnessKey;
        paletteKey?: NCoreUIKit.PaletteKey;
        themeKey?: NCoreUIKit.ThemeKey;
    };
};

interface ISnackBarProps extends SnackBarInternalProps {
};

export type {
    ISnackBarProps as default
};
