import type { StyleProp, ViewStyle, TextStyle } from 'react-native'; /** 按钮模式 */ export type ActionBarButtonMode = 'separate' | 'combined'; /** 左侧图标按钮配置 */ export interface ActionBarIconItem { /** 唯一标识 */ id: string | number; /** 图标名称(使用 DbIcon) */ iconName: string; /** 图标库 */ iconFamily?: 'Ionicons' | 'FontAwesome' | 'MaterialIcons' | 'Entypo' | 'AntDesign'; /** 图标大小 */ iconSize?: number; /** 图标颜色 */ iconColor?: string; /** 按钮文字 */ text?: string; /** 文字颜色 */ textColor?: string; /** 徽标数量 */ badge?: number | string; /** 徽标背景色 */ badgeColor?: string; /** 是否禁用 */ disabled?: boolean; /** 点击回调 */ onPress?: () => void; } /** 右侧操作按钮配置 */ export interface ActionBarButton { /** 按钮文字 */ text: string; /** 按钮背景色 */ backgroundColor?: string; /** 文字颜色 */ textColor?: string; /** 是否禁用 */ disabled?: boolean; /** 点击回调 */ onPress?: () => void; } /** 组件属性 */ export interface DbProductActionBarProps { /** 左侧图标按钮列表 */ leftIcons?: ActionBarIconItem[]; /** 右侧按钮模式 */ buttonMode?: ActionBarButtonMode; /** 右侧第一个按钮(加入购物车) */ primaryButton?: ActionBarButton; /** 右侧第二个按钮(立即购买) */ secondaryButton?: ActionBarButton; /** 容器高度 */ height?: number; /** 容器背景色 */ backgroundColor?: string; /** 容器样式 */ style?: StyleProp; /** 左侧区域样式 */ leftSectionStyle?: StyleProp; /** 右侧区域样式 */ rightSectionStyle?: StyleProp; /** 图标按钮样式 */ iconItemStyle?: StyleProp; /** 图标文字样式 */ iconTextStyle?: StyleProp; /** 按钮文字样式 */ buttonTextStyle?: StyleProp; /** 是否显示顶部分割线 */ showTopDivider?: boolean; /** 分割线颜色 */ dividerColor?: string; /** 是否固定在底部 */ fixed?: boolean; /** 安全区域适配 */ safeArea?: boolean; }