import {
    type ReactNode
} from "react";
import {
    type LayoutChangeEvent,
    type StyleProp,
    type ViewProps,
    type ViewStyle
} from "react-native";

export type IModalRef = {
    closeAnimation: (onClosed?: () => void) => void;
    setIsActive: (newActiveState: boolean) => void;
};

export type ModalAlignContentProp = "center" | "free";

export type ModalInternalProps = {
    contentStyle?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
    style?: StyleProp<ViewStyle>[] | StyleProp<ViewStyle>;
    onContainerLayout?: (e: LayoutChangeEvent) => void;
    customTheme?: {
        gapPropagation?: NCoreUIKit.GapPropagationKey;
        sharpness?: NCoreUIKit.SharpnessKey;
        paletteKey?: NCoreUIKit.PaletteKey;
        themeKey?: NCoreUIKit.ThemeKey;
    };
    onOverlayPress?: (props: {
        closeAnimation: (onClosed?: (props: {
            id: string;
        }) => void) => void;
    }) => void;
    alignContent?: ModalAlignContentProp;
    isScaleAnimatedOnlyOpen?: boolean;
    closeAnimationDelay?: number;
    openAnimationDelay?: number;
    isDisabledOverlay?: boolean;
    isContentRequired?: boolean;
    isOverlayVisible?: boolean;
    isWorkWithPortal?: boolean;
    isScaleAnimated?: boolean;
    overlayProps?: ViewProps;
    isAnimated?: boolean;
    children?: ReactNode;
    onClosed?: (props: {
        id: string;
    }) => void;
    portalName?: string;
    isActive?: boolean;
    id: string;
};

interface IModalProps extends ModalInternalProps {
};

export type {
    IModalProps as default
};
