var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
import { DEFAULT_ROUGHNESS } from '../consts.js';
import { ElementModel } from './base.js';
import { local, yfield } from './decorators.js';
export var ConnectorMode;
(function (ConnectorMode) {
    ConnectorMode[ConnectorMode["Straight"] = 0] = "Straight";
    ConnectorMode[ConnectorMode["Orthogonal"] = 1] = "Orthogonal";
    ConnectorMode[ConnectorMode["Curve"] = 2] = "Curve";
})(ConnectorMode || (ConnectorMode = {}));
export class ConnectorElementModel extends ElementModel {
    constructor() {
        super(...arguments);
        this.xywh = '[0,0,0,0]';
        this.rotate = 0;
        this.mode = ConnectorMode.Orthogonal;
        this.strokeWidth = 4;
        this.stroke = '#000000';
        this.strokeStyle = 'solid';
        this.roughness = DEFAULT_ROUGHNESS;
        this.source = {
            position: [0, 0],
        };
        this.target = {
            position: [0, 0],
        };
    }
    get type() {
        return 'connector';
    }
}
__decorate([
    local()
], ConnectorElementModel.prototype, "xywh", void 0);
__decorate([
    local()
], ConnectorElementModel.prototype, "rotate", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "mode", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "strokeWidth", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "stroke", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "strokeStyle", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "roughness", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "rough", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "source", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "target", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "frontEndpointStyle", void 0);
__decorate([
    yfield()
], ConnectorElementModel.prototype, "rearEndpointStyle", void 0);
//# sourceMappingURL=connector.js.map