//
//  MoPubNativeAdapterAdView.swift
//  SmaatoTestApp
//
//  Created by Smaato Inc on 10.02.20.
//  Copyright © 2020 Smaato Inc. All rights reserved.
//

import UIKit
import MoPub

class MoPubNativeAdapterAdView: UIView {
    @IBOutlet weak var titleTextLabel: UILabel!
    @IBOutlet weak var mainTextLabel: UILabel!
    @IBOutlet weak var ctaLabel: UILabel!
    @IBOutlet weak var sponsoredLabel: UILabel! //TODO: Mopub new version
    @IBOutlet weak var mainImageView: UIImageView!
    @IBOutlet weak var iconImageView: UIImageView!
    @IBOutlet weak var privacyIconImageView: UIImageView!
}

extension MoPubNativeAdapterAdView: MPNativeAdRendering {
        
    func nativeTitleTextLabel() -> UILabel! {
        return titleTextLabel
    }
    
    func nativeMainTextLabel() -> UILabel! {
        return mainTextLabel
    }
    
    func nativeCallToActionTextLabel() -> UILabel! {
        return ctaLabel
    }
    
    func nativeMainImageView() -> UIImageView! {
        return mainImageView
    }
    
    func nativeIconImageView() -> UIImageView! {
        return iconImageView
    }
    
    func nativePrivacyInformationIconImageView() -> UIImageView! {
        return privacyIconImageView
    }
    
    static func nibForAd() -> UINib! {
        return UINib(nibName: "MoPubNativeAdapterAdView", bundle: nil)
    }
}
