55 lines
1.7 KiB
TypeScript
55 lines
1.7 KiB
TypeScript
// Metro module 15463 (f15464).
|
|
import { memo, forwardRef } from "react";
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../../../design/components/Styles/native/createStyles";
|
|
import SearchBar from "./SearchBar";
|
|
import SearchFilterSuggestions from "./autocomplete/SearchFilterSuggestions";
|
|
import SearchFilterButton from "./autocomplete/SearchFilterButton";
|
|
const useStyles = createStyles({
|
|
header: {
|
|
flexDirection: "row",
|
|
alignItems: "center",
|
|
paddingLeft: 16,
|
|
zIndex: 10
|
|
},
|
|
headerWithBackButton: {
|
|
paddingLeft: 0
|
|
},
|
|
headerSearch: {
|
|
flex: 1,
|
|
flexGrow: 1
|
|
},
|
|
headerControlsRight: {
|
|
paddingRight: 16,
|
|
paddingLeft: 12
|
|
},
|
|
suggestionsAnchor: {
|
|
height: 0
|
|
},
|
|
suggestions: {
|
|
position: "absolute",
|
|
left: 0,
|
|
right: -50,
|
|
top: 8
|
|
},
|
|
suggestionsWithBackButton: {
|
|
left: -28
|
|
}
|
|
});
|
|
const r38 = memo(forwardRef(function({ searchContext, onSuggestionsLayoutMesure, suggestionsDismissed, setSuggestionsDismissed, backButton }, a1) {
|
|
const styles = useStyles();
|
|
return <View style={[styles.header, backButton != null && styles.headerWithBackButton]}>
|
|
{backButton}
|
|
<View style={styles.headerSearch}>
|
|
<SearchBar ref={a1} searchContext={searchContext} setSuggestionsDismissed={setSuggestionsDismissed} />
|
|
<View style={styles.suggestionsAnchor}>
|
|
<SearchFilterSuggestions searchContext={searchContext} onLayoutMeasure={onSuggestionsLayoutMesure} dismissed={suggestionsDismissed} containerStyle={[styles.suggestions, backButton != null && styles.suggestionsWithBackButton]} />
|
|
</View>
|
|
</View>
|
|
<View style={styles.headerControlsRight}>
|
|
<SearchFilterButton searchContext={searchContext} />
|
|
</View>
|
|
</View>;
|
|
}));
|
|
export default r38;
|