import {
    type ReactNode
} from "react";
import type {
    StyleProp,
    ViewStyle
} from "react-native";
import type IButtonProps from "../button/type";
import type ITextProps from "../text/type";

export type HeaderDynamicStyleType = {
    safeAreaViewBackgroundColor?: keyof NCoreUIKit.ContainerContentColors;
    backgroundColor: keyof NCoreUIKit.ContainerContentColors;
    configs: NCoreUIKit.ActivePalette["configs"];
    spaces: NCoreUIKit.ActivePalette["spaces"];
    colors: NCoreUIKit.ActivePalette["colors"];
    isWorkWithHeaderSpace?: boolean;
    headerSpace?: number;
};

export type NavigationType = {
    canGoBack: () => boolean;
    goBack: () => void;
};

export type ActionItem = IButtonProps;

interface IHeaderProps<T> {
    safeAreaViewBackgroundColor?: keyof NCoreUIKit.ContainerContentColors;
    backgroundColor?: keyof NCoreUIKit.ContainerContentColors;
    customTheme?: {
        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
        sharpness?: keyof NCoreUIKit.SharpnessKey;
        paletteKey?: keyof NCoreUIKit.PaletteKey;
        themeKey?: keyof NCoreUIKit.ThemeKey;
    };
    safeAreaViewStyle?: StyleProp<ViewStyle>;
    isWrapSafeareaContext?: boolean;
    isWorkWithHeaderSpace?: boolean;
    style?: StyleProp<ViewStyle>;
    actions?: Array<ActionItem>;
    isGoBackEnable?: boolean;
    titleProps?: ITextProps;
    renderTitle?: (props: {
        navigation?: T
    }) => ReactNode;
    renderRight?: (props: {
        navigation?: T
    }) => ReactNode;
    renderLeft?: (props: {
        navigation?: T
    }) => ReactNode;
    headerSpace?: number;
    children?: ReactNode;
    navigation?: T;
    title?: string;
}
export type {
    IHeaderProps as default
};
