/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten.
/// Generated from rtu-ui-v2/schemas/creditcard/CreditCardScannerUserGuidance.yaml

import { BackgroundStyle, StyledText } from '../../ui_v2/common/Common';
import { DeepPartial, PartiallyConstructible } from '../../utils/utils';

/**
Configure the captions of the user guidance hints for different scanning states.
*/
export class CreditCardScannerGuidanceStates extends PartiallyConstructible {
  /**
    The user guidance text displayed when no credit card is found. Initial state.
    
    Default is "?creditCardUserGuidanceNoCardFound"
    */
  public noCardFound: string = '?creditCardUserGuidanceNoCardFound';
  /**
    The user guidance text displayed when a card presence was detected and scanning is in progress.
    
    Default is "?creditCardUserGuidanceScanningProgress"
    */
  public scanningProgress: string = '?creditCardUserGuidanceScanningProgress';
  /**
    The user guidance text displayed when it is too dark to capture an adequate image.
    
    Default is "?creditCardUserGuidanceTooDark"
    */
  public tooDark: string = '?creditCardUserGuidanceTooDark';
  /**
    The user guidance text displayed when the detected card is too far away and appears too small.
    
    Default is "?creditCardUserGuidanceTooSmall"
    */
  public tooSmall: string = '?creditCardUserGuidanceTooSmall';
  /**
    The user guidance text displayed when the detected card is not in a good perspective (device tilted).
    
    Default is "?creditCardUserGuidanceBadPerspective"
    */
  public badPerspective: string = '?creditCardUserGuidanceBadPerspective';

  /** @param source {@displayType `DeepPartial<CreditCardScannerGuidanceStates>`} */
  public constructor(source: DeepPartial<CreditCardScannerGuidanceStates> = {}) {
    super();
    if (source.noCardFound !== undefined) {
      this.noCardFound = source.noCardFound;
    }
    if (source.scanningProgress !== undefined) {
      this.scanningProgress = source.scanningProgress;
    }
    if (source.tooDark !== undefined) {
      this.tooDark = source.tooDark;
    }
    if (source.tooSmall !== undefined) {
      this.tooSmall = source.tooSmall;
    }
    if (source.badPerspective !== undefined) {
      this.badPerspective = source.badPerspective;
    }
  }
}

/**
Configuration of the hints guiding users through the credit card scanning process.
*/
export class CreditCardScanGuidanceConfiguration extends PartiallyConstructible {
  /**
    Determines whether the user guidance hints should be visible (enabled).
    
    Default is true
    */
  public visibility: boolean = true;
  /**
    Configure the text style for the user guidance hints.
    */
  public title: StyledText = new StyledText({
    text: '?creditCardUserGuidanceNoCardFound',
    color: '?sbColorOnPrimary',
  });
  /**
    Configure the background style for the user guidance hints.
    */
  public background: BackgroundStyle = new BackgroundStyle({
    strokeColor: '#00000000',
    fillColor: '?sbColorSurfaceLow',
  });
  /**
    Configure the captions of the user guidance hints for different states.
    */
  public statesTitles: CreditCardScannerGuidanceStates = new CreditCardScannerGuidanceStates({});

  /** @param source {@displayType `DeepPartial<CreditCardScanGuidanceConfiguration>`} */
  public constructor(source: DeepPartial<CreditCardScanGuidanceConfiguration> = {}) {
    super();
    if (source.visibility !== undefined) {
      this.visibility = source.visibility;
    }
    if (source.title !== undefined) {
      this.title = new StyledText(source.title);
    }
    if (source.background !== undefined) {
      this.background = new BackgroundStyle(source.background);
    }
    if (source.statesTitles !== undefined) {
      this.statesTitles = new CreditCardScannerGuidanceStates(source.statesTitles);
    }
  }
}
