The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { msg } from "gt-react-native"; |
| 2 | import type { HeaderBarButtonMailSearchToolbarItem } from "react-native-screens"; |
| 3 | |
| 4 | import { m, type MessageResolver } from "../../i18n/messages"; |
| 5 | |
| 6 | import { NATIVE_LIQUID_GLASS_SUPPORTED } from "../../native/native-glass"; |
| 7 | |
| 8 | export const NATIVE_MAIL_SEARCH_TOOLBAR_SUPPORTED = NATIVE_LIQUID_GLASS_SUPPORTED; |
| 9 | |
| 10 | export const NATIVE_MAIL_SEARCH_TOOLBAR_CONTENT_INSET = 56; |
| 11 | |
| 12 | type NativeMailSearchToolbarInput = Omit< |
| 13 | HeaderBarButtonMailSearchToolbarItem, |
| 14 | "type" | "useFallbackSearchField" |
| 15 | >; |
| 16 | |
| 17 | export function createNativeMailSearchToolbarItem( |
| 18 | input: NativeMailSearchToolbarInput, |
| 19 | resolve: MessageResolver = m, |
| 20 | ): HeaderBarButtonMailSearchToolbarItem { |
| 21 | return { |
| 22 | placeholder: resolve(msg("Search")), |
| 23 | ...input, |
| 24 | type: "mailSearchToolbar", |
| 25 | useFallbackSearchField: true, |
| 26 | }; |
| 27 | } |