package com.abbidot.tracker.ui.activity.device.fences

import android.view.View
import com.abbidot.tracker.R
import com.abbidot.tracker.bean.FencesBean
import com.abbidot.tracker.constant.ConstantInt

/**
 *Created  by .yzq on 2024/1/24/024.
 * @link
 * @description:
 */
class AddSafeZoneActivity : AddAndEditFencesZoneBaseActivity() {

    override fun initData() {
        setTopBarTitle(R.string.txt_add_safe_zone)
        mFencesBean = FencesBean()
        super.initData()
//        mFencesMapCommon.setMapZoom(16f)
        mViewBinding.apply {
            setFenceShape(ConstantInt.CircleShapeType)
            safeZoneInitData()
        }
    }

    override fun liveDataObserve() {
        super.liveDataObserve()
        addLiveDataObserve()
    }

    override fun onClick(v: View?) {
        super.onClick(v)
        mViewBinding.apply {
            when(v!!){
                btnSaveFencesZone -> saveFences(mFencesBean)
            }
        }
    }
}