/** @internal NOTE: Internal APIs. Subject to change. Use of these APIs in production applications is not supported. */ /** */
import { CameraInputsManager } from '../loader/babylonjs-import';
import { TwinfinityTargetCameraMouseRotationInput } from './Inputs/TwinfinityTargetCameraMouseRotationInput';
import { TwinfinityTargetCameraMousePanInput } from './Inputs/TwinfinityTargetCameraMousePanInput';
import { TwinfinityTargetCameraMouseZoomInput } from './Inputs/TwinfinityTargetCameraMouseZoomInput';
import { TwinfinityCameraTouchInput } from './Inputs/TwinfinityCameraTouchInput';
import { TwinfinityTargetCameraKeyboardInput } from './Inputs/TwinfinityCameraKeyboardInput';
/**
 * Default Inputs manager for the PivotTargetCamera.
 * It groups all the default supported inputs for ease of use.
 * @see http://doc.babylonjs.com/how_to/customizing_camera_inputs
 */
export class TwinfinityTargetCameraInputsManager extends CameraInputsManager {
    /**
     */
    _mouseRotationInput = null;
    _mousePanInput = null;
    _mouseZoomInput = null;
    _touchInput = null;
    _keyboardInput = null;
    isPanEnabled = true;
    isZoomEnabled = true;
    isRotationEnabled = true;
    isKeyboardMoveEnabled = true;
    mode = 'all';
    /**
     * Instantiates a new TwinfinityTargetCameraInputsManager.
     * @param camera Defines the camera the inputs belong to
     */
    constructor(camera) {
        super(camera);
    }
    /**
     * Add left mouse button input support to the input manager.
     * This is used for rotation for PivotTargetCamera
     * @returns the current input manager
     */
    addMouseRotation() {
        if (!this._mouseRotationInput) {
            this._mouseRotationInput = new TwinfinityTargetCameraMouseRotationInput(this);
            this.add(this._mouseRotationInput);
        }
        return this;
    }
    /**
     * Removes the left mouse button input support from the manager
     * @returns the current input manager
     */
    removeMouseRotation() {
        if (this._mouseRotationInput) {
            this.remove(this._mouseRotationInput);
        }
        return this;
    }
    /**
     * Add middle mouse button input support to the input manager.
     * This is used for panning the PivotTargetCamera
     * @returns the current input manager
     */
    addMousePan() {
        if (!this._mousePanInput) {
            this._mousePanInput = new TwinfinityTargetCameraMousePanInput(this);
            this.add(this._mousePanInput);
        }
        return this;
    }
    /**
     * Removes the middle mouse button input support from the manager
     * @returns the current input manager
     */
    removeMousePan() {
        if (this._mousePanInput) {
            this.remove(this._mousePanInput);
        }
        return this;
    }
    /**
     * Add mouse scroll wheel input support to the input manager.
     * This is used for zooming in and out the TargetCamera
     * @returns the current input manager
     */
    addMouseZoom() {
        if (!this._mouseZoomInput) {
            this._mouseZoomInput = new TwinfinityTargetCameraMouseZoomInput(this);
            this.add(this._mouseZoomInput);
        }
        return this;
    }
    /**
     * Removes the mouse scroll wheel input support from the manager
     * @returns the current input manager
     */
    removeMouseZoom() {
        if (this._mouseZoomInput) {
            this.remove(this._mouseZoomInput);
        }
        return this;
    }
    /**
     * Add keyboard input support to the input manager.
     * @returns the current input manager
     */
    addKeyboard() {
        if (!this._keyboardInput) {
            this._keyboardInput = new TwinfinityTargetCameraKeyboardInput(this);
            this.add(this._keyboardInput);
        }
        return this;
    }
    /**
     * Removes the keyboard input support from the manager
     * @returns the current input manager
     */
    removeKeyboard() {
        if (this._keyboardInput) {
            this.remove(this._keyboardInput);
        }
        return this;
    }
    /**
     * Add touch rotation input support to the input manager.
     * This is used when one finger is touching the screen
     * @returns the current input manager
     */
    addTouch() {
        if (!this._touchInput) {
            this._touchInput = new TwinfinityCameraTouchInput(this);
            this.add(this._touchInput);
        }
        return this;
    }
    /**
     * Removes touch rotation input support from the manager
     * @returns the current input manager
     */
    removeTouch() {
        if (this._touchInput) {
            this.remove(this._touchInput);
        }
        return this;
    }
    /**
     * Remove all attached input methods from this PivotTargetCamera
     */
    clear() {
        super.clear();
        this._mouseRotationInput = null;
        this._mousePanInput = null;
        this._mouseZoomInput = null;
        this._touchInput = null;
    }
}
//# sourceMappingURL=TwinfinityTargetCameraInputsManager.js.map