'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

var constants = require('../constants.js');

/* IMPORT */
/* MAIN */
class Type {
    constructor() {
        /* VARIABLES */
        this.type = constants.TYPE.ALL;
    }
    /* API */
    get() {
        return this.type;
    }
    set(type) {
        if (this.type && this.type !== type)
            throw new Error('Cannot change both RGB and HSL channels at the same time');
        this.type = type;
    }
    reset() {
        this.type = constants.TYPE.ALL;
    }
    is(type) {
        return this.type === type;
    }
}

exports.default = Type;
