/** * Core ServiceList Components * Provides low-level access to ServiceListService via render props */ import React from 'react'; import { type ServiceListServiceConfig, type QueryOptions } from '../../../services/service-list/service-list.js'; import type { Service } from '@wix/auto_sdk_bookings_services'; import type { PagingMetadata } from '../../../api/query-services/index.js'; /** * Props for ServiceList.Root component */ export interface RootProps { children: React.ReactNode; serviceListConfig: ServiceListServiceConfig; } /** * Root component that provides ServiceList service context. * * @component * @example * ```tsx * * {children} * * ``` */ export declare function Root(props: RootProps): React.ReactNode; /** * Props for Services render prop component */ export interface ServicesProps { /** Render function that receives services list and metadata */ children: (props: ServicesRenderProps) => React.ReactNode; } /** * Render props for Services component */ export interface ServicesRenderProps { /** Array of services */ services: Service[]; /** Whether services are currently loading */ isLoading: boolean; /** Error message, or null if no error */ error: string | null; /** Current query options (appId, filters, sort) */ queryOptions: QueryOptions; /** Pagination metadata (limit, offset, count, hasNext) */ pagingMetadata: PagingMetadata; /** Whether more services can be loaded */ hasMore: boolean; /** Function to load more services */ loadMore: (count?: number) => Promise; } /** * Component that provides services list data through render props. * Exposes services, loading state, error, query options, and pagination metadata (including hasNext flag). * * @component * @example * ```tsx * * {({ services, isLoading, error, pagingMetadata }) => { * if (isLoading) return Loading...; * if (error) return Error: {error}; * return ( * * {services.map(service => ( * {service.name} * ))} * {pagingMetadata.hasNext && ( * Load More Services * )} * * ); * }} * * ``` */ export declare function Services(props: ServicesProps): React.ReactNode;