// Copyright (C) The Arvados Authors. All rights reserved. // // SPDX-License-Identifier: AGPL-3.0 import { unionize, ofType, UnionOf } from "~/common/unionize"; export const searchBarActions = unionize({ SET_CURRENT_VIEW: ofType(), OPEN_SEARCH_VIEW: ofType<{}>(), CLOSE_SEARCH_VIEW: ofType<{}>() }); export type SearchBarActions = UnionOf; export const goToView = (currentView: string) => searchBarActions.SET_CURRENT_VIEW(currentView);