UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

62 lines (61 loc) 1.93 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ "use client"; import * as e from "react"; import { useLocalization as f } from "@progress/kendo-react-intl"; import { searchIcon as l, sparklesIcon as I, zoomSparkleIcon as i } from "@progress/kendo-svg-icons"; import { smartBoxAIAssistantPlaceholder as m, messages as u, smartBoxSemanticSearchPlaceholder as s, smartBoxSearchPlaceholder as p } from "../../../messages/index.mjs"; function k({ selectedView: r, searchMode: n, semanticSearchMode: a, aiAssistantMode: o, sharedPlaceholder: c }) { const t = f(), g = e.useMemo(() => { switch (r) { case "search": return { name: "search", svgIcon: l }; case "semanticSearch": return { name: "zoom-sparkle", svgIcon: i }; case "aiAssistant": return { name: "sparkles", svgIcon: I }; default: return { name: "search", svgIcon: l }; } }, [r]); return { inputPlaceholder: e.useMemo(() => { if (c) return c; switch (r) { case "search": return (n == null ? void 0 : n.placeholder) || t.toLanguageString( p, u[p] ); case "semanticSearch": return (a == null ? void 0 : a.placeholder) || t.toLanguageString( s, u[s] ); case "aiAssistant": return (o == null ? void 0 : o.placeholder) || t.toLanguageString( m, u[m] ); default: return ""; } }, [r, n, a, o, c, t]), prefixIcon: g }; } export { k as useSmartBoxLabels };