type PageItem = {
    name: string;
    props?: Record<string, any>;
    styles?: Record<string, any>;
};

type PageType = {
    [pageName: string]: PageItem[];
};

type TemplateType = {
    pages: PageType;
    items: string[];
};

type TabbarMapType = {
    [pageName: string]: {
        pagePath: string,
        text: string,
        title?: string,
        iconPath: string,
        selectedIconPath: string
    }
}

interface IAppOption {
    globalData: {
        userInfo?: WechatMiniprogram.UserInfo,
        isLogin?: boolean,
        wasLogin?: boolean,
        template?: TemplateType | null,
        showStock?: boolean,
        store?: any,
        joinedArray: string[],
        safeBottom: number,
        safeTop: number,
        tabbarMap?: TabbarMapType,
        tabbarItems?: any[],
        sseStore: any,
        isModalShowing: Boolean
    },
    getPageParams?: (id: number) => any,
    checkLoginState: () => boolean,
    redirectLogin: () => any,
    login: (value: string) => boolean,
    getTemplate?: () => Promise<any>,
    // serverSentEvents: () => void,
    userInfoReadyCallback?: WechatMiniprogram.GetUserInfoSuccessCallback,
}
