import{__decorate as t}from"tslib";import{serializable as e}from"../support/Serializable.js";import{Settings as i}from"../support/Settings.js";import{objectKeys as n}from"../utilities/object.js";let o=class extends i{get minScale(){return this._getSetting("minScale")}set minScale(t){this._setSetting("minScale",t)}get maxScale(){return this._getSetting("maxScale")}set maxScale(t){this._setSetting("maxScale",t)}get snapToZoom(){return this._getSetting("snapToZoom",!1)}set snapToZoom(t){this._setSetting("snapToZoom",t)}get rotationEnabled(){return this._getSetting("rotationEnabled",!0)}set rotationEnabled(t){this._setSetting("rotationEnabled",t)}get viewSync(){return this._getSetting("viewSync")}set viewSync(t){this._setSetting("viewSync",t)}toJSON(t="all"){const e=super.toJSON(t);if(e)for(const t of n(e))this.isModified(t)||delete e[t];return e}_getSerializableProperties(){return{minScale:"initial",maxScale:"initial",snapToZoom:{serializeModes:["initial"],default:!1},rotationEnabled:{serializeModes:["initial"],default:!0},viewSync:"initial"}}};o=t([e],o);export{o as MapConstraints};