"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cursorClasses = void 0;
var lib_1 = require("typestyle/lib");
var cursors_1 = require("../cursors");
var Cursor = /** @class */ (function () {
    function Cursor(x, y, mode, nib, dragId) {
        this._layer = null;
        this.x = x;
        this.y = y;
        this.mode = mode;
        this.nib = nib;
        this.dragId = dragId;
        if (this.mode === 'pen' && this.nib === null) {
            this.mode = 'nope';
        }
    }
    Cursor.prototype.isEqual = function (other) {
        return (this.x === other.x &&
            this.y === other.y &&
            this.mode === other.mode &&
            this.nib === other.nib &&
            this.dragId === other.dragId);
    };
    return Cursor;
}());
exports.default = Cursor;
exports.cursorClasses = {
    nope: lib_1.style({
        cursor: 'not-allowed'
    }),
    pen: lib_1.style({
        cursor: "url(" + cursors_1.pen + "), pointer"
    }),
    eraser: lib_1.style({
        cursor: "url(" + cursors_1.eraser + "), pointer"
    }),
    base: lib_1.style({
        cursor: 'not-allowed'
    })
};
//# sourceMappingURL=cursor.js.map