def make()

in src/main/scala/com/gu/commercial/branding/Logo.scala [17:38]


  def make(
    title: String,
    sponsorshipType: SponsorshipType,
    sponsorshipPackage: Option[SponsorshipPackage],
    src: String,
    dimensions: Option[SponsorshipLogoDimensions],
    link: String
  ): Logo = {
    Logo(
      src = src,
      dimensions = dimensions.map(d => Dimensions(d.width, d.height)),
      link,
      label = sponsorshipType match {
        case SponsorshipType.PaidContent => "Paid for by"
        case SponsorshipType.Foundation =>
          s"${sensitiveTitles.getOrElse(title, title)} is supported by"
        case _ if sponsorshipPackage.contains(SponsorshipPackage.Us) => "Advertising partner"
        case _ if sponsorshipPackage.contains(SponsorshipPackage.UsExclusive) => "Exclusive advertising partner"
        case _ => "Supported by"
      }
    )
  }