diff options
Diffstat (limited to 'src/content/usecases/NavigateUseCase.ts')
-rw-r--r-- | src/content/usecases/NavigateUseCase.ts | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/src/content/usecases/NavigateUseCase.ts b/src/content/usecases/NavigateUseCase.ts index f790212..6f82d3f 100644 --- a/src/content/usecases/NavigateUseCase.ts +++ b/src/content/usecases/NavigateUseCase.ts @@ -1,27 +1,36 @@ -import * as navigates from '../navigates'; +import NavigationPresenter, { NavigationPresenterImpl } + from '../presenters/NavigationPresenter'; + +export default class NavigateUseCase { + private navigationPresenter: NavigationPresenter; + + constructor({ + navigationPresenter = new NavigationPresenterImpl(), + } = {}) { + this.navigationPresenter = navigationPresenter; + } -export default class NavigateClass { openHistoryPrev(): void { - navigates.historyPrev(window); + this.navigationPresenter.openHistoryPrev(); } openHistoryNext(): void { - navigates.historyNext(window); + this.navigationPresenter.openHistoryNext(); } openLinkPrev(): void { - navigates.linkPrev(window); + this.navigationPresenter.openLinkPrev(); } openLinkNext(): void { - navigates.linkNext(window); + this.navigationPresenter.openLinkNext(); } openParent(): void { - navigates.parent(window); + this.navigationPresenter.openParent(); } openRoot(): void { - navigates.root(window); + this.navigationPresenter.openRoot(); } } |