import { defineComponent, getCurrentInstance, createCommentVNode } from 'vue';
import '../../../composables/index.mjs';
import { url, show, modelMatrix, scale, minimumPixelSize, maximumScale, id, allowPicking, incrementallyLoadTextures, asynchronous, clampAnimations, shadows, debugShowBoundingVolume, debugWireframe, heightReference, scene, distanceDisplayCondition, color, colorBlendMode, colorBlendAmount, silhouetteColor, silhouetteSize, clippingPlanes, imageBasedLightingFactor, lightColor, luminanceAtZenith, sphericalHarmonicCoefficients, specularEnvironmentMaps, credit, backFaceCulling, enableMouseEvent } from '../../../utils/cesium-props.mjs';
import { kebabCase } from '../../../utils/util.mjs';
import usePrimitives from '../../../composables/use-primitives/index.mjs';

var PrimitiveModel = defineComponent({
  name: "VcPrimitiveModel",
  props: {
    ...url,
    basePath: String,
    ...show,
    ...modelMatrix,
    ...scale,
    ...minimumPixelSize,
    ...maximumScale,
    ...id,
    ...allowPicking,
    ...incrementallyLoadTextures,
    ...asynchronous,
    ...clampAnimations,
    ...shadows,
    ...debugShowBoundingVolume,
    ...debugWireframe,
    ...heightReference,
    ...scene,
    ...distanceDisplayCondition,
    ...color,
    ...colorBlendMode,
    ...colorBlendAmount,
    ...silhouetteColor,
    ...silhouetteSize,
    ...clippingPlanes,
    dequantizeInShader: {
      type: Boolean,
      default: true
    },
    ...imageBasedLightingFactor,
    ...lightColor,
    ...luminanceAtZenith,
    ...sphericalHarmonicCoefficients,
    ...specularEnvironmentMaps,
    ...credit,
    ...backFaceCulling,
    ...enableMouseEvent
  },
  emits: ["beforeLoad", "ready", "destroyed", "readyPromise"],
  setup(props, ctx) {
    const instance = getCurrentInstance();
    instance.cesiumClass = "Model";
    const primitivesState = usePrimitives(props, ctx, instance);
    instance.createCesiumObject = async () => {
      const options = primitivesState == null ? void 0 : primitivesState.transformProps(props);
      return Cesium.Model.fromGltf(options);
    };
    return () => {
      var _a;
      return createCommentVNode(kebabCase(((_a = instance.proxy) == null ? void 0 : _a.$options.name) || ""));
    };
  }
});

export { PrimitiveModel as default };
//# sourceMappingURL=index.mjs.map
