{"version":3,"file":"index.mjs","sources":["../../../../../../packages/components/graphics/path/index.ts"],"sourcesContent":["/*\n * @Author: zouyaoji@https://github.com/zouyaoji\n * @Date: 2021-09-16 09:28:13\n * @LastEditTime: 2022-04-06 11:17:48\n * @LastEditors: zouyaoji\n * @Description:\n * @FilePath: \\vue-cesium@next\\packages\\components\\graphics\\path\\index.ts\n */\nimport { createCommentVNode, defineComponent, getCurrentInstance } from 'vue'\nimport type { ExtractPropTypes } from 'vue'\nimport type {\n  VcCallbackPropertyFunction,\n  VcComponentInternalInstance,\n  VcComponentPublicInstance,\n  VcDistanceDisplayCondition,\n  VcMaterial,\n  VcReadyObject\n} from 'casc-cesium-utils/types'\nimport { useGraphics } from 'casc-cesium-composables'\nimport { show, width, material, distanceDisplayCondition } from 'casc-cesium-utils/cesium-props'\nimport { kebabCase } from 'casc-cesium-utils/util'\nimport { commonEmits } from 'casc-cesium-utils/emits'\nexport const pathGraphicsProps = {\n  ...show,\n  leadTime: [Number, Object, Function],\n  trailTime: [Number, Object, Function],\n  ...width,\n  resolution: {\n    type: [Number, Object, Function],\n    default: 60\n  },\n  ...material,\n  ...distanceDisplayCondition\n}\nexport default defineComponent({\n  name: 'VcGraphicsPath',\n  props: pathGraphicsProps,\n  emits: commonEmits,\n  setup(props, ctx) {\n    // state\n    const instance = getCurrentInstance() as VcComponentInternalInstance\n    instance.cesiumClass = 'PathGraphics'\n    useGraphics(props, ctx, instance)\n\n    return () => createCommentVNode(kebabCase(instance.proxy?.$options.name || ''))\n  }\n})\n\nexport type VcGraphicsPathProps = {\n  /**\n   * A boolean Property specifying the visibility of the path.\n   * Default value: true\n   */\n  show?: boolean | Cesium.CallbackProperty | VcCallbackPropertyFunction<boolean>\n  /**\n   * A Property specifying the number of seconds in front the object to show.\n   */\n  leadTime?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying the number of seconds behind of the object to show.\n   */\n  trailTime?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A numeric Property specifying the width in pixels.\n   * Default value: 1.0\n   */\n  width?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * Gets or sets the Property specifying whether the box is outlined.\n   * Default value: 60\n   */\n  resolution?: number | Cesium.CallbackProperty | VcCallbackPropertyFunction<number>\n  /**\n   * A Property specifying the material used to draw the path.\n   * Default value: white\n   */\n  material?: VcMaterial\n  /**\n   * A Property specifying at what distance from the camera that this path will be displayed.\n   */\n  distanceDisplayCondition?: VcDistanceDisplayCondition\n  /**\n   * Triggers before the VcGraphicsPath is loaded.\n   */\n  onBeforeLoad?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when the VcGraphicsPath is successfully loaded.\n   */\n  onReady?: (readyObject: VcReadyObject) => void\n  /**\n   * Triggers when the component load failed.\n   */\n  onUnready?: (e: any) => void\n  /**\n   * Triggers when the VcGraphicsPath is destroyed.\n   */\n  onDestroyed?: (instance: VcComponentInternalInstance) => void\n  /**\n   * Triggers when a property or sub-property is changed or modified.\n   */\n  onDefinitionChanged?: (property: Cesium.Property) => void\n}\n\nexport type VcGraphicsPathRef = VcComponentPublicInstance<VcGraphicsPathProps>\n"],"names":[],"mappings":";;;;;;;AAKY,MAAC,iBAAiB,GAAG;AACjC,EAAE,GAAG,IAAI;AACT,EAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;AACtC,EAAE,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;AACvC,EAAE,GAAG,KAAK;AACV,EAAE,UAAU,EAAE;AACd,IAAI,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;AACpC,IAAI,OAAO,EAAE,EAAE;AACf,GAAG;AACH,EAAE,GAAG,QAAQ;AACb,EAAE,GAAG,wBAAwB;AAC7B,EAAE;AACF,mBAAe,eAAe,CAAC;AAC/B,EAAE,IAAI,EAAE,gBAAgB;AACxB,EAAE,KAAK,EAAE,iBAAiB;AAC1B,EAAE,KAAK,EAAE,WAAW;AACpB,EAAE,KAAK,CAAC,KAAK,EAAE,GAAG,EAAE;AACpB,IAAI,MAAM,QAAQ,GAAG,kBAAkB,EAAE,CAAC;AAC1C,IAAI,QAAQ,CAAC,WAAW,GAAG,cAAc,CAAC;AAC1C,IAAI,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC;AACtC,IAAI,OAAO,MAAM;AACjB,MAAM,IAAI,EAAE,CAAC;AACb,MAAM,OAAO,kBAAkB,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,QAAQ,CAAC,KAAK,KAAK,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC;AAC9G,KAAK,CAAC;AACN,GAAG;AACH,CAAC,CAAC;;;;"}