import { ViewStyle } from 'react-native';

export type TrustBannerCallbackParams = {
  service_name: string;
  screen_name: string;
  component_name: string;
  urlConfig?: string;
};

export type TrustBannerProps = {
  /**
   * Optional. Styles to customize the appearance of the banner. Can be a single
   * style object or an array of style objects.
   */
  style?: ViewStyle | ViewStyle[];

  /**
   * Optional. The name of the screen where the banner is displayed, sent as
   * `screen_name` in the display and click tracking events.
   */
  screenName?: string;

  /**
   * Optional. The name of the service or feature the banner is associated with,
   * sent as `service_name` in the display and click tracking events.
   */
  serviceName?: string;

  /**
   * Optional. Not called: the banner opens `urlConfig` itself through
   * `navigator.maxApi` (openWeb or startFeatureCode).
   */
  onPress?: (params: TrustBannerCallbackParams) => void;

  /**
   * Optional. Not called: the banner tracks via `navigator.maxApi.trackEvent`.
   */
  trackEvent?: (eventName: string, params: TrustBannerCallbackParams) => void;
};

export type CustomAvatarProps = {
  image?: string;
  text?: string;
  style?: ViewStyle[] | ViewStyle;
};
