//
//  RightLocationTableViewCell.swift
//  WoWonder
//
//  Created by Mac on 11/11/22.
//  Copyright © 2022 ScriptSun. All rights reserved.
//

import UIKit
import GoogleMaps

class RightLocationTableViewCell: SwipeToReplyCell {

    @IBOutlet weak var cellView: UIView!
    @IBOutlet weak var messageView: UIView!
    @IBOutlet weak var forwardedView: UIView!
    @IBOutlet weak var replyStoryView: UIView!
    @IBOutlet weak var replyStoryBorderView: UIView!
    @IBOutlet weak var replyStoryTitleLabel: UILabel!
    @IBOutlet weak var replyStoryMessageLabel: UILabel!
    @IBOutlet weak var replyStoryImageView: UIImageView!
    @IBOutlet weak var reactionImageView: UIImageView!
    @IBOutlet weak var replyMessageView: UIView!
    @IBOutlet weak var replyUserLabel: UILabel!
    @IBOutlet weak var replyMessageLabel: UILabel!
    @IBOutlet weak var mapView: UIView!
    @IBOutlet weak var mapButton: UIButton!
    @IBOutlet weak var googleMapView: GMSMapView!
    @IBOutlet weak var messageTimeLabel: UILabel!
    @IBOutlet weak var starImageView: UIImageView!
    @IBOutlet weak var lastSeenImage: UIImageView!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        self.messageView.clipsToBounds = true
        self.messageView.layer.cornerRadius = 16
        self.messageView.layer.maskedCorners = [.layerMaxXMaxYCorner, .layerMinXMaxYCorner, .layerMinXMinYCorner]
    }
    
    func configureMapView(lat: Double, long: Double) {
        let camera = GMSCameraPosition.camera(withLatitude: lat, longitude: long, zoom: 10)
        self.googleMapView.isMyLocationEnabled = true
        self.googleMapView.camera = camera
        let marker = GMSMarker()
        marker.position = camera.target
        marker.map = self.googleMapView
    }
    
}
