package com.knecon.fforesight.service.layoutparser.processor.services.factory;

import java.awt.geom.Rectangle2D;
import java.util.Collections;
import java.util.List;

import com.knecon.fforesight.service.layoutparser.processor.model.graph.Boundary;

import lombok.AccessLevel;
import lombok.Builder;
import lombok.Getter;
import lombok.experimental.FieldDefaults;

@Builder
@Getter
@FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE)
public class SearchTextWithTextPositionDto {

    String searchText;
    List<Integer> lineBreaks;
    List<Integer> stringIdxToPositionIdx;
    List<Boundary> boldTextBoundaries;
    List<Boundary> italicTextBoundaries;
    List<Rectangle2D> positions;


    public static SearchTextWithTextPositionDto empty() {

        return SearchTextWithTextPositionDto.builder()
                .searchText("")
                .lineBreaks(Collections.emptyList())
                .positions(Collections.emptyList())
                .stringIdxToPositionIdx(Collections.emptyList())
                .build();
    }

}
