    import Zondy from '../../Zondy'
    import { defaultValue } from '../../../util'
    import { Symbol3DLayerType } from '../../enum'
    import { Color } from '../../../base'
    import WaterbodySize from '../../enum/WaterbodySize'
    import WaveStrength from '../../enum/WaveStrength'
    import Symbol3DLayer from './Symbol3DLayer'

    /**
     * 水面符号图层，定义如何在三维场景中沟构造水面几何，不支持二维视图
     *
     * @class WaterSymbol3DLayer
     * @moduleEX SymbolModule
     * @extends Symbol3DLayer
     * @param {Object} options 构造参数
     * @param {Color} [options.color = new Color()] 水面颜色
     * @param {WaterbodySize} [options.waterbodySize = WaterbodySize.medium] 水体大小
     * @param {Number} [options.waveDirection] 波浪频率
     * @param {WaveStrength} [options.waveStrength = WaveStrength.moderate] 波浪强度
     *
     * @summary <h5>支持如下方法：</h5>
     * <a href='#fromJSON'>[1、通过json数据构造一个WaterSymbol3DLayer对象]</a><br/>
     * <a href='#toJSON'>[2、导出为json数据]</a><br/>
     * <a href='#clone'>[3、克隆并返回一个新的WaterSymbol3DLayer对象]</a><br/>
     * */
    class WaterSymbol3DLayer extends Symbol3DLayer {
      constructor(options) {
        super(options)
        options = defaultValue(options, {})
        /**
         * 三维符号图层类型
         * @member {Symbol3DLayerType} WaterSymbol3DLayer.prototype.type
         */
        this.type = Symbol3DLayerType.water
        /**
         * 水面颜色
         * @member {Color} WaterSymbol3DLayer.prototype.color
         */
        this.color = defaultValue(options.color, new Color())
        /**
         * 水体大小
         * @member {WaterbodySize} WaterSymbol3DLayer.prototype.waterbodySize
         */
        this.waterbodySize = defaultValue(
          options.waterbodySize,
          WaterbodySize.medium
        )
        /**
         * 波浪频率
         * @member {Number} WaterSymbol3DLayer.prototype.waveDirection
         */
        this.waveDirection = defaultValue(options.waveDirection, undefined)
        /**
         * 波浪强度
         * @member {WaveStrength} WaterSymbol3DLayer.prototype.waveStrength
         */
        this.waveStrength = defaultValue(
          options.waveStrength,
          WaveStrength.moderate
        )
      }

      /**
       * <a id='fromJSON'/>
       * 通过json数据构造一个WaterSymbol3DLayer对象
       * @param {Object} json json数据
       * @return {LineCallout3D} 新的WaterSymbol3DLayer对象
       * */
      static fromJSON(json) {
        return new WaterSymbol3DLayer(json)
      }

      /**
       * <a id='toJSON'/>
       * 导出为json数据
       * @return {Object} 导出的json数据
       * */
      toJSON() {
        return {
          type: this.type,
          color: this.color.toJSON(),
          waterbodySize: this.waterbodySize,
          waveDirection: this.waveDirection,
          waveStrength: this.waveStrength
        }
      }

      /**
       * <a id='clone'/>
       * 克隆并返回一个新的WaterSymbol3DLayer对象
       * @return {WaterSymbol3DLayer} 新的WaterSymbol3DLayer对象
       * */
      clone() {
        return new WaterSymbol3DLayer(this.toJSON())
      }
    }

    Zondy.Symbol.WaterSymbol3DLayer = WaterSymbol3DLayer
    export default WaterSymbol3DLayer