import { StyleProp, ViewStyle, TextStyle } from 'react-native'; /** Loading 动画类型 */ export type LoadingType = 'spinner' | 'dots' | 'pulse' | 'wave' | 'bounce' | 'circular' | 'custom'; /** Loading 尺寸 */ export type LoadingSize = 'small' | 'medium' | 'large' | number; /** DbLoading 组件属性 */ export interface DbLoadingProps { /** 是否显示(用于全屏模式) */ visible?: boolean; /** 加载动画类型 */ type?: LoadingType; /** 尺寸 */ size?: LoadingSize; /** 主题色 */ color?: string; /** 次要颜色(用于某些动画效果) */ secondaryColor?: string; /** 加载提示文字 */ text?: string; /** 文字位置 */ textPosition?: 'bottom' | 'right'; /** 文字样式 */ textStyle?: StyleProp; /** 文字与图标间距 */ textGap?: number; /** 是否全屏显示(带遮罩层) */ fullscreen?: boolean; /** 遮罩层颜色 */ maskColor?: string; /** 遮罩层是否可点击关闭 */ maskClosable?: boolean; /** 关闭回调 */ onClose?: () => void; /** 容器样式 */ style?: StyleProp; /** 内容容器样式(全屏模式下的中心内容) */ contentStyle?: StyleProp; /** 动画速度(毫秒) */ duration?: number; /** 是否垂直布局 */ vertical?: boolean; /** 自定义内容 */ children?: React.ReactNode; /** 背景色(非全屏模式下的容器背景) */ backgroundColor?: string; /** 圆角 */ borderRadius?: number; } /** Loading 全局方法 */ export interface LoadingMethods { /** 显示加载 */ show: (options?: Partial | string) => void; /** 隐藏加载 */ hide: () => void; } /** Loading 指示器组件属性(内部使用) */ export interface LoadingIndicatorProps { type: LoadingType; size: number; color: string; secondaryColor?: string; duration?: number; children?: React.ReactNode; }