//
//  ViewController.swift
//  Sojourn
//
//  Created by Donald Dugger on 4/15/26.
//

import UIKit

class PopupVC: UIViewController, UITextFieldDelegate, UITextViewDelegate {

weak var delegate: PopupDelegate?
    var handler: PopupLayout?
var data: Any?

@IBOutlet weak var LeftButton: UIButton!
@IBOutlet weak var TitleLbl: UILabel!
@IBOutlet weak var RightButton: UIButton!

@IBAction func CancelAct(_ sender: Any)
{

    //Log.d("PopupVC:Cancel");
    self.dismiss(animated: true, completion: nil)
}

@IBAction func OKAction(_ sender: Any)
{

//Log.d("PopupVC:OK");
    self.dismiss(animated: true, completion: nil)
    handler?.update(delegate!);
}

func textFieldShouldReturn(_ textField: UITextField) -> Bool
{

Log.l("Text should return")
    self.view.endEditing(true)
    return false
}

override func viewDidLoad() {
	super.viewDidLoad()
	// Do any additional setup after loading the view.
//Log.l("PopupVC()")
    handler?.show(self, data: data);
}

}
