//
//  FirstStepView.swift
//  kt
//
//  Created by Assylkhan Rakhatov on 30.01.16.
//  Copyright © 2016 Alexandr Zalutskiy. All rights reserved.
//

import Foundation
import UIKit

class FirstStepView : UIView {
  @IBOutlet var stepLabel: UILabel!
  @IBOutlet var stepLabelHeight: NSLayoutConstraint!
  @IBOutlet var tipLabel: UILabel!
  @IBOutlet var tipLabelHeight: NSLayoutConstraint!
  @IBOutlet var guidField: UITextField!
  @IBOutlet var codeField: UITextField!
  @IBOutlet var nextButton: UIButton!
  @IBOutlet var prevButton: UIButton!
  
  class func instanceFromNib() -> FirstStepView {
    return UINib(nibName: "FirstStepView", bundle: NSBundle.mainBundle()).instantiateWithOwner(self, options: nil)[0] as! FirstStepView
  }
  
  func localizeSubviews(vc: FirstStepOfRegistrationVC) {
        //    let theAttributedString = try! NSMutableAttributedString(data: LocalizedString("registration.label.guid_description").dataUsingEncoding(NSUTF8StringEncoding)!,
    //      options: [NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType, NSCharacterEncodingDocumentAttribute: NSUTF8StringEncoding], documentAttributes: nil)
    //    theAttributedString.addAttribute(NSFontAttributeName, value: UIFont.systemFontOfSize(17), range: NSRange(location: 0, length: theAttributedString.length))
    //    tipLabel.attributedText = theAttributedString
    prevButton.titleLabel?.text = LocalizedString("registration.button.cancel")
//    guidTextField.localizeWithParent(self, localizedId: "guid_code")
//    registrationTextField.localizeWithParent(self, localizedId: "registration_code")
    nextButton.titleLabel?.text = LocalizedString("registration.button.next")
  }
}
