import { defineComponent, getCurrentInstance, createCommentVNode } from 'vue';
import '../../../composables/index.mjs';
import { minimumLevel, maximumLevel, rectangle } from '../../../utils/cesium-props.mjs';
import TiandituImageryProvider from './TiandituImageryProvider.mjs';
import { kebabCase } from '../../../utils/util.mjs';
import useProviders from '../../../composables/use-providers/index.mjs';

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

export { ProviderImageryTianditu as default };
//# sourceMappingURL=imagery.mjs.map
