import {
  BlazeFont,
  BlazeImage,
  BlazePlayerButtonStyle,
  BlazeSeekBarStyle,
} from '.';

export interface BlazeVideosPlayerStyle {
  headingText?: BlazeVideosPlayerHeadingTextStyle;
  buttons?: BlazeVideosPlayerButtonsStyle;
  backgroundColor?: string; //Hex
  cta?: BlazeVideosPlayerCtaStyle;
  seekBar?: BlazeVideosPlayerSeekBarStyle;
}

interface BlazeVideosPlayerHeadingTextStyle {
  font?: BlazeFont;
  textColor?: string; //Hex
  textSize?: number;
  contentSource?: BlazeVideosPlayerHeadingTextContentSource;
  isVisible?: boolean;
  numberOfLines?: number;
}

interface BlazeVideosPlayerButtonsStyle {
  mute?: BlazePlayerButtonStyle;
  exit?: BlazePlayerButtonStyle;
  share?: BlazePlayerButtonStyle;
  like?: BlazePlayerButtonStyle;
  playPause?: BlazePlayerButtonStyle;
  previous?: BlazePlayerButtonStyle;
  next?: BlazePlayerButtonStyle;
}

interface BlazeVideosPlayerCtaStyle {
  cornerRadius?: number;
  textSize?: number;
  font?: BlazeFont;
  width?: number;
  height?: number;
  icon?: BlazeVideosPlayerCtaIconStyle,
  ctaVisibility?: BlazeVideosPlayerCtaVisibility;
}

export type BlazeVideosPlayerCtaVisibility =
  |
  {
    type: "visibleAfterOverlayHidden";
    duration: number // In seconds.
  }
  |
  {
    type: "alwaysVisible"
  };

interface BlazeVideosPlayerCtaIconStyle {
  iconImage?: BlazeImage;
  //Relvant to Android only
  iconPositioning?: BlazeVideosPlayerCTAIconPositioning;
  //Relvant to Android only
  iconTint?: string; //Hex
}

interface BlazeVideosPlayerSeekBarStyle {
  isVisible?: boolean;
  playingState?: BlazeSeekBarStyle;
  pausedState?: BlazeSeekBarStyle;
  horizontalSpacing?: number;
  bottomSpacing?: number;
}

type BlazeVideosPlayerHeadingTextContentSource = 'Title';

type BlazeVideosPlayerCTAIconPositioning = 'Start';