import { assert } from "../../../../core/assert.js";

export class InputBinding {
    /**
     *
     * @param {string} path
     * @param {function} listener
     * @param {boolean} [exclusive=false]
     */
    constructor({ path, listener, exclusive = false }) {
        assert.isString(path, 'path');
        assert.isFunction(listener, 'listener');
        assert.isBoolean(exclusive, 'exclusive');

        /**
         *
         * @type {string}
         */
        this.path = path;
        /**
         *
         * @type {Function}
         */
        this.listener = listener;
        /**
         * @deprecated don't use
         * @type {boolean}
         */
        this.exclusive = exclusive;
    }
}
