import {
    type ViewStyle,
    type StyleProp,
    type TextStyle
} from "react-native";

export type SwitchDynamicStyleType = {
    displayBehaviourWhileLoading?: SwitchDisplayBehaviourWhileLoading;
    inlineSpaces: NCoreUIKit.ActivePalette["inlineSpaces"];
    spaces: NCoreUIKit.ActivePalette["spaces"];
    colors: NCoreUIKit.ActivePalette["colors"];
    spreadBehaviour?: SwitchSpreadBehaviour;
    SWITCH_INDICATOR_SIZE: number;
    currentType: SwitchTypes;
    isDisabled?: boolean;
    isLoading?: boolean;
    isActive?: boolean;
    isFlip?: boolean;
    type: SwitchType;
};

export type SwitchTypes = {
    containerColor: keyof NCoreUIKit.ContainerContentColors;
    indicatorColor: keyof NCoreUIKit.IconContentColors;
    subTitleColor: keyof NCoreUIKit.TextContentColors;
    titleColor: keyof NCoreUIKit.TextContentColors;
};

export type SwitchTypeConstantType = {
    type: SwitchType;
};

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

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

export type SwitchSpreadBehaviour = "baseline" | "stretch" | "free";

interface ISwitchProps {
    displayBehaviourWhileLoading?: SwitchDisplayBehaviourWhileLoading;
    subTitleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
    titleStyle?: StyleProp<TextStyle>[] | StyleProp<TextStyle>;
    style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
    customTheme?: {
        gapPropagation?: NCoreUIKit.GapPropagationKey;
        sharpness?: NCoreUIKit.SharpnessKey;
        paletteKey?: NCoreUIKit.PaletteKey;
        themeKey?: NCoreUIKit.ThemeKey;
    };
    spreadBehaviour?: SwitchSpreadBehaviour;
    customLocalize?: {
        activeLocale?: NCoreUIKit.LocaleKey;
    };
    animationDuration?: number;
    optionalText?: string;
    isDisabled?: boolean;
    isOptional?: boolean;
    onPress?: () => void;
    isLoading?: boolean;
    isActive?: boolean;
    subTitle?: string;
    type?: SwitchType;
    isFlip?: boolean;
    title?: string;
}
export type {
    ISwitchProps as default
};
