import { BaseSelection, PathFinder } from '@blockeditor/block-std';
import z from 'zod';
const ImageSelectionSchema = z.object({
    path: z.array(z.string()),
});
export class ImageSelection extends BaseSelection {
    equals(other) {
        if (other instanceof ImageSelection) {
            return PathFinder.equals(this.path, other.path);
        }
        return false;
    }
    toJSON() {
        return {
            type: this.type,
            path: this.path,
        };
    }
    static fromJSON(json) {
        ImageSelectionSchema.parse(json);
        return new ImageSelection({
            path: json.path,
        });
    }
}
ImageSelection.type = 'image';
ImageSelection.group = 'note';
//# sourceMappingURL=image-selection.js.map