aboutsummaryrefslogblamecommitdiff
path: root/src/content/usecases/FindUseCase.ts
blob: 9e77124dd8a2b127b748949f7a9b57015c0d8709 (plain) (tree)




















                                                        
import { inject, injectable } from "tsyringe";
import FindPresenter from "../presenters/FindPresenter";

@injectable()
export default class FindUseCase {
  constructor(
    @inject("FindPresenter")
    private readonly findPresenter: FindPresenter
  ) {}

  findNext(keyword: string): boolean {
    return this.findPresenter.find(keyword, false);
  }

  findPrev(keyword: string): boolean {
    return this.findPresenter.find(keyword, true);
  }

  clearSelection() {
    this.findPresenter.clearSelection();
  }
}