import {
  BlazeColor,
  BlazeFirstTimeSlideCTAStyle,
  BlazeFirstTimeSlideInstructionStyle as BlazeFirstTimeSlideInstructionStyle,
  BlazeFirstTimeSlideTextStyle as BlazeFirstTimeSlideTextStyle,
  BlazeFont,
  BlazeImage,
  BlazePlayerButtonStyle,
  BlazeMargins,
} from '.';

export interface BlazeMomentsPlayerStyle {
  headingText?: BlazeMomentsPlayerHeadingTextStyle;
  bodyText?: BlazeMomentsPlayerBodyTextStyle;
  buttons?: BlazeMomentsPlayerButtonsStyle;
  chips?: BlazeMomentsPlayerChipsStyle
  backgroundColor?: string; //Hex
  cta?: BlazeMomentsPlayerCtaStyle;
  headerGradient?: BlazeMomentsPlayerHeaderGradientStyle;
  footerGradient?: BlazeMomentsPlayerFooterGradientStyle;
  firstTimeSlide?: BlazeMomentsPlayerFirstTimeSlideStyle;
  seekBar?: BlazeMomentsPlayerSeekBarStyle;
  bottomComponentsAlignment?: BlazeMomentsPlayerBottomComponentsAlignment;
  playerDisplayMode?: BlazePlayerDisplayMode
}

interface BlazeMomentsPlayerHeadingTextStyle {
  font?: BlazeFont;
  textColor?: string; //Hex
  textSize?: number;
  contentSource?: BlazeMomentsPlayerHeadingTextContentSource;
  isVisible?: boolean;
}

interface BlazeMomentsPlayerBodyTextStyle {
  font?: BlazeFont;
  textColor?: string; //Hex
  textSize?: number;
  contentSource?: BlazeMomentsPlayerItemBodyTextContentSource;
  isVisible?: boolean;
}

interface BlazeMomentsPlayerButtonsStyle {
  mute?: BlazePlayerButtonStyle;
  exit?: BlazePlayerButtonStyle;
  share?: BlazePlayerButtonStyle;
  like?: BlazePlayerButtonStyle;
  play?: BlazePlayerButtonStyle;
}

interface BlazeMomentsPlayerChipsStyle {
  ad?: BlazeMomentsPlayerChipStyle;
}

interface BlazeMomentsPlayerChipStyle {
  titlePadding?: BlazeMargins;
  text?: string;
  textColor?: string; //Hex
  backgroundColor?: string; //Hex
  isVisible?: boolean;
}


interface BlazeMomentsPlayerCtaStyle {
  cornerRadius?: number;
  textSize?: number;
  font?: BlazeFont;
  width?: number;
  height?: number;
  layoutPositioning?: BlazeMomentsPlayerCTAPositioning;
  horizontalAlignment?: BlazeMomentsPlayerCTAHorizontalAlignment;
  icon?: BlazeMomentsPlayerCtaIconStyle
}

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

interface BlazeMomentsPlayerHeaderGradientStyle {
  isVisible?: boolean;
  startColor?: string; //Hex
  endColor?: string; //Hex
}

interface BlazeMomentsPlayerFooterGradientStyle {
  isVisible?: boolean;
  startColor?: string; //Hex
  endColor?: string; //Hex
  endPositioning?: BlazeMomentsPlayerFooterGradientPositioning
}

interface BlazeMomentsPlayerFirstTimeSlideStyle {
  show?: boolean;
  cta?: BlazeFirstTimeSlideCTAStyle;
  backgroundColor?: BlazeColor;
  mainTitle?: BlazeFirstTimeSlideTextStyle;
  subtitle?: BlazeFirstTimeSlideTextStyle;
  instructions?: BlazeMomentsPlayerFirstTimeSlideInstructionsStyle;
}

interface BlazeMomentsPlayerFirstTimeSlideInstructionsStyle {
  next?: BlazeFirstTimeSlideInstructionStyle;
  previous?: BlazeFirstTimeSlideInstructionStyle;
  pause?: BlazeFirstTimeSlideInstructionStyle;
  play?: BlazeFirstTimeSlideInstructionStyle;
}

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

interface BlazeSeekBarStyle {
  isVisible?: boolean;
  backgroundColor?: string; //Hex,  
  progressColor?: string; //Hex,
  height?: number;
  cornerRadius?: number;
  thumbColor?: string; //Hex,
  thumbImage?: BlazeImage;
  thumbSize?: number;
  isThumbVisible?: boolean;
}

type BlazeMomentsPlayerFooterGradientPositioning = 'BottomToPlayer' | 'BottomToContainer';

type BlazeMomentsPlayerHeadingTextContentSource = 'Title' | 'Subtitle';

type BlazeMomentsPlayerItemBodyTextContentSource = 'Title' | 'Subtitle' | 'Description';

type BlazeMomentsPlayerBottomComponentsAlignment = 'RelativeToContainer' | 'RelativeToPlayer' | 'FitCtaBelowPlayer';

type BlazeMomentsPlayerCTAPositioning = 'CtaBellowBottomButtonsBox' | 'CtaNextToBottomButtonsBox';

type BlazeMomentsPlayerCTAHorizontalAlignment = 'Start' | 'Center' | 'End' | 'FullAvailableWidth';

type BlazeMomentsPlayerCTAIconPositioning = 'Start';


/**
 * Type for Blaze Player Display Mode.
 */
type BlazePlayerDisplayMode =
    /**
     * Maintains the video's original 9:16 aspect ratio, fitting it within the container.
     * This may result in letterboxing if the container's aspect ratio differs.
     */
    'FixedRatio_9_16' |

    /**
     * Expands the video to cover the entire container, cropping excess content as necessary
     * to maintain the aspect ratio, centered within the container.
     */
    'ResizeAspectFillCenterCrop';