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 AddNoGoZoneActivity : AddAndEditFencesZoneBaseActivity() {

    override fun initData() {
        setTopBarTitle(R.string.txt_add_no_go_zone)
        mFencesBean = FencesBean().apply {
            fenceType = 2
            fenceNameType = 6
        }
        super.initData()
//        mFencesMapCommon.setMapZoom(18f)
        mViewBinding.apply {
            noGoZoneInitData()
            setFenceShape(ConstantInt.CircleShapeType)
        }
    }

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

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