import { Point } from "./point";

export interface RangeModel {
  start: Point;
  end: Point;
}
export class Range {
  static create(rangeModel: RangeModel) {
    const range = new Range(rangeModel);
    return range;
  }

  rangeModel: RangeModel;

  constructor(rangeModel: RangeModel) {
    this.rangeModel = rangeModel;
  }

  get start() {
    return this.rangeModel.start;
  }

  set start(point: Point) {
    this.rangeModel.start = point;
  }

  get end() {
    return this.rangeModel.end;
  }

  set end(point: Point) {
    this.rangeModel.end = point;
  }
}
