'use strict';

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

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

var ProviderImagerySupermap = vue.defineComponent({
  name: "VcProviderImagerySupermap",
  props: {
    ...cesiumProps.url,
    ...cesiumProps.minimumLevel,
    ...cesiumProps.maximumLevel,
    name: String,
    transparent: {
      type: Boolean,
      default: true
    },
    credit: {
      type: String,
      default: "MapQuest, SuperMap iServer Imagery"
    },
    ...cesiumProps.projectionTransforms
  },
  emits: ["beforeLoad", "ready", "destroyed", "readyPromise"],
  setup(props, ctx) {
    const instance = vue.getCurrentInstance();
    instance.cesiumClass = "SuperMapImageryProvider";
    const providersState = index["default"](props, ctx, instance);
    if (providersState === void 0) {
      return;
    }
    instance.createCesiumObject = async () => {
      Cesium.SuperMapImageryProvider = Cesium.SuperMapImageryProvider || SuperMapImageryProvider["default"];
      if (providersState.unwatchFns.length === 0) {
        providersState.setPropsWatcher(true);
      }
      const options = providersState.transformProps(props);
      return new Cesium.SuperMapImageryProvider(options);
    };
    return () => {
      var _a;
      return vue.createCommentVNode(util.kebabCase(((_a = instance.proxy) == null ? void 0 : _a.$options.name) || ""));
    };
  }
});

exports["default"] = ProviderImagerySupermap;
//# sourceMappingURL=index.js.map
