import type {
    SetStateAction,
    ReactElement,
    Dispatch,
    Ref
} from "react";
import {
    type NCoreUIKitIcon
} from "../../types";
import type {
    IBottomSheetRef
} from "../bottomSheet/type";
import type IBottomSheetProps from "../bottomSheet/type";

export type SelectSheetDynamicStyleType = {
    radiuses: NCoreUIKit.ActivePalette["radiuses"];
    spaces: NCoreUIKit.ActivePalette["spaces"];
    colors: NCoreUIKit.ActivePalette["colors"];
    isSearchable?: boolean;
};

export type SelectedItem = {
    __title: string;
    __key: string;
};

interface ISelectSheetProps<T> {
    selectObject: (selectedItem: T & SelectedItem | SelectedItem) => void;
    keyExtractor: (item: T & SelectedItem, index: number) => string;
    customTheme?: {
        gapPropagation?: keyof NCoreUIKit.GapPropagationKey;
        sharpness?: keyof NCoreUIKit.SharpnessKey;
        paletteKey?: keyof NCoreUIKit.PaletteKey;
        themeKey?: keyof NCoreUIKit.ThemeKey;
    };
    searchedData: Array<SelectedItem | (T & SelectedItem)>;
    renderItem?: (props: {
        onSelect: (selectedItem: SelectedItem) => void;
        data: Array<T & SelectedItem | SelectedItem>;
        setIsMoreLoading: (state: boolean) => void;
        setIsLoading: (state: boolean) => void;
        selectedItems: Array<SelectedItem>;
        isSelected: boolean;
        searchText: string;
        item: SelectedItem;
        index: number;
        key: string;
    }) => ReactElement;
    onMoreLoad?: (props: {
        data: Array<T & SelectedItem | SelectedItem>;
        setIsMoreLoading: (state: boolean) => void;
        setIsLoading: (state: boolean) => void;
        selectedItems: Array<SelectedItem>;
        searchText: string;
    }) => void;
    setSearchText: Dispatch<SetStateAction<string>>;
    setIsLoading: Dispatch<SetStateAction<boolean>>;
    setIsActive: Dispatch<SetStateAction<boolean>>;
    data: Array<SelectedItem | (T & SelectedItem)>;
    customLocalize?: {
        activeLocale?: keyof NCoreUIKit.LocaleKey;
    };
    bottomSheetRef: Ref<IBottomSheetRef> | null;
    setIsMoreLoading: (state: boolean) => void;
    LoadingIconComponentProp?: NCoreUIKitIcon;
    renderOptionIcon?: (props: {
        item: T & SelectedItem | SelectedItem;
        index: number;
    }) => ReactElement;
    mainSelectedItems: Array<SelectedItem>;
    isWorkWithRealtime: boolean;
    moreLoadThreshold?: number;
    isMultipleSelect?: boolean;
    bottomSheetProps?: Omit<
        IBottomSheetProps, |
    "key" |
    "customKey" |
    "ref" |
    "isAutoHeight" |
    "isActive" |
    "renderBottom" |
    "renderHeader" |
    "onClose"
    >;
    isMoreLoading: boolean;
    isSearchable?: boolean;
    isShowTools?: boolean;
    selectAll: () => void;
    selectBoxKey: string;
    cleanAll: () => void;
    maxChoice?: number;
    minChoice?: number;
    searchText: string;
    customKey?: string;
    isLoading: boolean;
    cancel: () => void;
    isActive: boolean;
    ok: () => void;
    title?: string;
};
export type {
    ISelectSheetProps as default
};
