| 241 | } |
| 242 | |
| 243 | const emptyMessage = () => { |
| 244 | if (grouped.loading) return props.loadingMessage ?? i18n.t("ui.list.loading") |
| 245 | if (props.emptyMessage) return props.emptyMessage |
| 246 | |
| 247 | const query = filter() |
| 248 | if (!query) return i18n.t("ui.list.empty") |
| 249 | |
| 250 | const suffix = i18n.t("ui.list.emptyWithFilter.suffix") |
| 251 | return ( |
| 252 | <> |
| 253 | <span>{i18n.t("ui.list.emptyWithFilter.prefix")}</span> |
| 254 | <span data-slot="list-filter">"{query}"</span> |
| 255 | <Show when={suffix}> |
| 256 | <span>{suffix}</span> |
| 257 | </Show> |
| 258 | </> |
| 259 | ) |
| 260 | } |
| 261 | |
| 262 | return ( |
| 263 | <div data-component="list" classList={{ [props.class ?? ""]: !!props.class }}> |