         return titleLabel
     }
 
-    private func getTermsAndConditionsTextView() -> UITextView {
+    private func getTermsAndConditionsTextView(terms: PXTermsDto) -> UITextView {
         let termsAndConditionsText = UITextView()
         termsAndConditionsText.linkTextAttributes = [.foregroundColor: UIColor.white]
         termsAndConditionsText.delegate = self


        let consumerCreditsImage = getConsumerCreditsImageView(isDisabled: isDisabled)
        containerView.addSubview(consumerCreditsImage)
        NSLayoutConstraint.activate([
            PXLayout.setWidth(owner: consumerCreditsImage, width: creditsImageWidth),
            PXLayout.setHeight(owner: consumerCreditsImage, height: creditsImageHeight),
            PXLayout.centerHorizontally(view: consumerCreditsImage),
            PXLayout.centerVertically(view: consumerCreditsImage, to: containerView, withMargin: -creditsImageHeight/2)
        ])

        let titleLabel = getTitleLabel(creditsViewModel: creditsViewModel)
        containerView.addSubview(titleLabel)
        NSLayoutConstraint.activate([
            PXLayout.pinLeft(view: titleLabel, to: containerView, withMargin: margins),
            PXLayout.pinRight(view: titleLabel, to: containerView, withMargin: margins),
            PXLayout.put(view: titleLabel, onBottomOf: consumerCreditsImage)
        ])

        let termsAndConditionsText = getTermsAndConditionsTextView()
        containerView.addSubview(termsAndConditionsText)
        NSLayoutConstraint.activate([
            PXLayout.pinBottom(view: termsAndConditionsText, to: containerView, withMargin: margins - PXLayout.XXXS_MARGIN),
            PXLayout.pinLeft(view: termsAndConditionsText, to: containerView, withMargin: margins),
            PXLayout.pinRight(view: termsAndConditionsText, to: containerView, withMargin: margins)
        ])

        PXLayout.setHeight(owner: termsAndConditionsText, height: termsAndConditionsTextHeight).isActive = true
        let tycText = creditsViewModel.displayInfo.bottomText.text
        let attributedString = NSMutableAttributedString(string: tycText)

        var phrases: [PXLinkablePhraseDto] = [PXLinkablePhraseDto]()
        if let remotePhrases = creditsViewModel.displayInfo.bottomText.linkablePhrases {
            phrases = remotePhrases
        }

        for linkablePhrase in phrases {
            if let customLink = linkablePhrase.link {
                let tycLinkRange = (tycText as NSString).range(of: linkablePhrase.phrase)
                attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: tycLinkRange)
                attributedString.addAttribute(NSAttributedString.Key.link, value: customLink, range: tycLinkRange)
            } else if let customHtml = linkablePhrase.html {
                let customLink = HtmlStorage.shared.set(customHtml)
                let tycLinkRange = (tycText as NSString).range(of: linkablePhrase.phrase)
                attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: tycLinkRange)
                attributedString.addAttribute(NSAttributedString.Key.link, value: customLink, range: tycLinkRange)
            }
        }

        termsAndConditionsText.attributedText = attributedString
        termsAndConditionsText.textAlignment = .center
        termsAndConditionsText.textColor = .white
    }
}


        termsAndConditionsText.isEditable = false
        termsAndConditionsText.backgroundColor = .clear
        termsAndConditionsText.translatesAutoresizingMaskIntoConstraints = false

        let attributedString = getTermsAndConditionsText(terms: terms)
        termsAndConditionsText.attributedText = attributedString
        termsAndConditionsText.textAlignment = .center
        termsAndConditionsText.textColor = .white

        return termsAndConditionsText
    }

    private func getTermsAndConditionsText(terms: PXTermsDto) -> NSAttributedString {
        let tycText = terms.text
        let attributedString = NSMutableAttributedString(string: tycText)

        var phrases: [PXLinkablePhraseDto] = [PXLinkablePhraseDto]()
        if let remotePhrases = terms.linkablePhrases {
            phrases = remotePhrases
        }

        for linkablePhrase in phrases {
            if let customLink = linkablePhrase.link {
                let tycLinkRange = (tycText as NSString).range(of: linkablePhrase.phrase)
                attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: tycLinkRange)
                attributedString.addAttribute(NSAttributedString.Key.link, value: customLink, range: tycLinkRange)
            } else if let customHtml = linkablePhrase.html {
                let customLink = HtmlStorage.shared.set(customHtml)
                let tycLinkRange = (tycText as NSString).range(of: linkablePhrase.phrase)
                attributedString.addAttribute(NSAttributedString.Key.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: tycLinkRange)
                attributedString.addAttribute(NSAttributedString.Key.link, value: customLink, range: tycLinkRange)
            }
        }

        return attributedString
    }
}
