import List from "../../../../../src/core/collection/list/List.js";
import { ParticleLayer } from "../../../../../src/engine/graphics/particles/particular/engine/emitter/ParticleLayer.js";
import { BitFlagsEditor } from "../common/BitFlagsEditor.js";
import {
    ParticleEmitterFlag
} from "../../../../../src/engine/graphics/particles/particular/engine/emitter/ParticleEmitterFlag.js";
import { ObjectEditor } from "../primitive/ObjectEditor.js";
import { EnumEditor } from "../common/EnumEditor.js";
import { BlendingType } from "../../../../../src/engine/graphics/texture/sampler/BlendingType.js";

export class ParticleEmitterEditor extends ObjectEditor {
    get schema() {
        return {
            properties: {
                parameters: {
                    transient: true
                },
                layers: {
                    type: List,
                    type_parameters: [ParticleLayer]
                },
                particles: {
                    transient: true
                },
                mesh: {
                    transient: true
                },
                bvhLeaf: {
                    transient: true
                },
                particleBounds: {
                    transient: true
                },
                emisionBounds: {
                    transient: true
                },
                flags: {
                    editor: new BitFlagsEditor(ParticleEmitterFlag)
                },
                blendingMode: {
                    editor: new EnumEditor(BlendingType)
                },
                sleepTime: {
                    transient: true,
                },
                position: {
                    transient: true
                },
                rotation: {
                    transient: true
                },
                scale: {
                    transient: true
                }
            }
        };
    }
}
