'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var vue = require('vue');
require('../../../composables/index.js');
var cesiumProps = require('../../../utils/cesium-props.js');
var TiandituImageryProvider = require('./TiandituImageryProvider.js');
var util = require('../../../utils/util.js');
var index = require('../../../composables/use-providers/index.js');

var ProviderImageryTianditu = vue.defineComponent({
  name: "VcProviderImageryTianditu",
  props: {
    ...cesiumProps.minimumLevel,
    ...cesiumProps.maximumLevel,
    ...cesiumProps.rectangle,
    mapStyle: String,
    token: String,
    protocol: {
      type: String,
      default: "https"
    }
  },
  emits: ["beforeLoad", "ready", "destroyed", "readyPromise"],
  setup(props, ctx) {
    const instance = vue.getCurrentInstance();
    instance.cesiumClass = "TiandituImageryProvider";
    const providersState = index["default"](props, ctx, instance);
    if (providersState === void 0) {
      return;
    }
    instance.createCesiumObject = async () => {
      Cesium.TiandituImageryProvider = Cesium.TiandituImageryProvider || TiandituImageryProvider["default"];
      if (providersState.unwatchFns.length === 0) {
        providersState.setPropsWatcher(true);
      }
      const options = providersState.transformProps(props);
      return new Cesium.TiandituImageryProvider(options);
    };
    return () => {
      var _a;
      return vue.createCommentVNode(util.kebabCase(((_a = instance.proxy) == null ? void 0 : _a.$options.name) || ""));
    };
  }
});

exports["default"] = ProviderImageryTianditu;
//# sourceMappingURL=imagery.js.map
