import { Profile, ProfileSearchRequest, ProfileSearchWhere } from '@lens-protocol/api-bindings'; import { PaginatedArgs, PaginatedReadResult } from "../helpers/reads.js"; import { SuspenseEnabled, SuspensePaginatedResult } from "../helpers/suspense.js"; /** * {@link useSearchProfiles} hook arguments */ export type UseSearchProfilesArgs = PaginatedArgs; export type { ProfileSearchRequest, ProfileSearchWhere }; /** * {@link useSearchProfiles} hook arguments with Suspense support * * @experimental This API can change without notice */ export type UseSuspenseSearchProfilesArgs = SuspenseEnabled; /** * `useSearchProfiles` is a paginated hook that lets you search for profiles based on a defined criteria * * ```tsx * function SearchProfiles() { * const { data, error, loading } = useSearchProfiles({ query: 'foo' }); * * if (loading) return ; * * if (error) return ; * * return ( *
    * {data.map((profile) => ( *
  • {profile.handle}
  • * ))} *
* ); * } * ``` * * @category Discovery * @group Hooks */ export declare function useSearchProfiles(args: UseSearchProfilesArgs): PaginatedReadResult; /** * `useSearchProfiles` is a paginated hook that lets you search for profiles based on a defined criteria * * This signature supports [React Suspense](https://react.dev/reference/react/Suspense). * * ```tsx * const { data } = useSearchProfiles({ * query: 'foo', * suspense: true, * }); * * console.log(data); * ``` * * Use [startTransition](https://react.dev/reference/react/startTransition) to avoid to re-suspend the component. * * ```tsx * const [query, setQuery] = useState('bob'); * * const { data } = useSearchProfiles({ * query, * suspense: true, * }); * * const search = () => { * startTransition(() => { * setQuery('foo'); * }); * }; * ``` * * @experimental This API can change without notice * @category Discovery * @group Hooks */ export declare function useSearchProfiles(args: UseSuspenseSearchProfilesArgs): SuspensePaginatedResult;