import "./pod-log-search.scss"; import React from "react"; import { observer } from "mobx-react"; import { SearchInput } from "../input"; import { searchStore } from "./search.store"; import { Icon } from "../icon"; import { _i18n } from "../../i18n"; import { t } from "@lingui/macro"; export interface PodLogSearchProps { onSearch: (query: string) => void toPrevOverlay: () => void toNextOverlay: () => void logs: string[] } export const PodLogSearch = observer((props: PodLogSearchProps) => { const { logs, onSearch, toPrevOverlay, toNextOverlay } = props; const { setNextOverlayActive, setPrevOverlayActive, searchQuery, occurrences } = searchStore; const jumpDisabled = !searchQuery || !occurrences.length; const setSearch = (query: string) => { searchStore.onSearch(logs, query); onSearch(query); }; const onPrevOverlay = () => { setPrevOverlayActive(); toPrevOverlay(); } const onNextOverlay = () => { setNextOverlayActive(); toNextOverlay(); } return (