import { IMaterialItem, IWeAppData, IMiniprogramPlugin } from '@cloudbase/lowcode-generator/lib/weapps-core';
import { IBuildWedaApp } from '../core';
/**
 * All build parameters and intermediate data to be share across processes
 */
export interface ICommonBuildContext {
    /**
     * 账号信息
     */
    uin?: string;
    materialLibs: IMaterialItem[];
    isProduction: boolean;
    rootPath?: string;
    debugMode?: boolean;
    isBrowserMpBuilder?: boolean;
    processCssUnit?: 'px' | 'rem' | 'rpx';
    /**
     * 是否是私有化的环境
     */
    isPrivateMode?: boolean;
}
export interface IDefaultAppWindowConfig {
    navigationBarBackgroundColor?: string;
    navigationBarTextStyle?: 'white' | 'black';
    navigationBarTitleText?: string;
    navigationStyle?: 'default' | 'custom';
    homeButton?: boolean;
    backgroundColor?: string;
    backgroundTextStyle?: 'dark' | 'light';
    backgroundColorTop?: string;
    backgroundColorBottom?: string;
    enablePullDownRefresh?: boolean;
    onReachBottomDistance?: number;
    pageOrientation?: 'portrait' | 'auto' | 'landscape';
    restartStrategy?: string;
    initialRenderingCache?: 'static' | 'dynamic';
    visualEffectInBackground?: 'none' | 'hidden';
    handleWebviewPreload?: 'static' | 'manual' | 'auto';
}
export interface IAppCommonBuildContext extends ICommonBuildContext {
    /**
     * 应用id
     */
    appId: string;
    projDir: string;
    domain: string;
    mainAppData: IWeAppData;
    isMixMode: boolean;
    /**
     * 云开发sdk请求，js-sdk or wx.cloud
     */
    endpointType?: 'tcb-api' | 'wechat-service';
    /**
     * 云开发私密链路配置
     */
    privatelinkConfig?: IBuildWedaApp['privatelinkConfig'];
    /**
     * 是否使用默认加载
     */
    enableLoading?: boolean;
    /**
     * 应用版本
     */
    version?: string;
    /**
     * 是否启用过期
     */
    enableExpiredTag?: boolean;
    /**
     * 显示微信云模板toast
     */
    enableAd?: boolean;
    /**
     * 应用运行态动态全局配置
     */
    runtimeDynamicConfig?: Object;
    /**
     * 是否禁用应用
     */
    disabled?: boolean;
    /**
     * 自定义状态页Id
     */
    statusPageId?: string;
    /**
     * use official lib npm
     */
    enableOfficialLibNPM?: boolean;
}
export interface IMpCommonBuildContext extends ICommonBuildContext {
    /**
     * 组件库目录独立子包
     */
    enableAsyncMaterials?: boolean;
    miniprogramPlugins?: IMiniprogramPlugin[];
    disablePageComponentInvoke?: boolean;
}
export interface IBuildContext extends IAppCommonBuildContext, IMpCommonBuildContext {
    /**
     * 是否在页面层面添加节点
     * 并设置 #page-root-id
     */
    enablePageRoot?: boolean;
    /**
     * weda 默认自身root
     */
    wedaRoot?: string;
    /**
     * app.json文件window配置
     */
    defaultAppWindowConfig?: IDefaultAppWindowConfig;
    /**
     * 内部定义，请勿使用
     * 如必须使用 @rohyang
     */
    __defaultLoginType__?: 'openId' | 'anonymous';
}
