 import UIKit
 
 /**
- This protocol should be implemented by the view which owns this component; Although the component's functionality is sort-of self-sufficient, we still have some calls to the parent
+ This protocol should be implemented by the view which owns the BSCcInputLine control; Although the component's functionality is sort-of self-sufficient, we still have some calls to the parent
  */
 protocol BSCcInputLineDelegate : class {
     /**

            imageName = "default"
            NSLog("ccTypew \(ccType) does not have an icon")
        }
        if let image = BSViewsManager.getImage(imageName: "cc_\(imageName!)") {
            self.image = image
        }
    }
    
    private func checkMaxLength(textField: UITextField!, maxLength: Int) -> Bool {

        return result
    }

    // private/internal functions
    
    func updateCcIcon(ccType : String?) {
        
        // change the image in ccIconImage
        if let image = getCcIconByCardType(ccType: ccType) {
            self.image = image
        }
    }
    
    /**
     This function updates the image that holds the card-type icon according to the chosen card type.
     Override this if necessary.
     */
    func getCcIconByCardType(ccType : String?) -> UIImage? {
        
        var imageName : String?
        if let ccType = ccType?.lowercased() {
            imageName = ccImages[ccType]
