//
// © 2018-2020 Qualcomm Technologies, Inc. and/or its subsidiaries. All rights reserved.
//

import UIKit

class SearchTitleView: UIView {
	@IBOutlet private var contentView: UIView!
	@IBOutlet var searchBar: UISearchBar!
	@IBOutlet var cancelButton: UIButton!

	override init(frame: CGRect) {
		super.init(frame: frame)
		commonInit()
	}
	
	required init?(coder aDecoder: NSCoder) {
		super.init(coder: aDecoder)
		commonInit()
	}
	
	func commonInit() {
		Bundle.main.loadNibNamed("SearchTitleView",
								 owner: self,
								 options: nil)
		contentView.frame = self.bounds
		addSubview(contentView)
		contentView.autoresizingMask = .flexibleWidth

        searchBar.makeAccessible(Accessibility.SearchScreen.searchText)
        cancelButton.makeAccessible(Accessibility.SearchScreen.cancel)
	}
}
