/**
* Core LocationList Component
* Bridge between LocationListService and headless components using render props
*
* @module Core/LocationList
*/
import React from 'react';
import { type LocationListServiceConfig } from '../../../services/location-list/location-list.js';
import type { Location } from '../../../services/location-list/location-list.def.js';
/**
* Props for LocationList.Root component
*/
export interface RootProps {
children: React.ReactNode;
locationListServiceConfig: LocationListServiceConfig;
}
/**
* Root component that provides LocationList service context
*
* @component
* @example
* ```tsx
*
*
* {({ displayLocations }) => (
* // render locations
* )}
*
*
* ```
*/
export declare function Root(props: RootProps): React.ReactNode;
/**
* Render props for Locations component
*/
export interface LocationsRenderProps {
/** Raw locations array from the service */
locations: Location[];
/** Processed display locations for UI */
displayLocations: Location[];
/** Whether there are any locations */
hasLocations: boolean;
/** Whether custom locations exist */
hasCustomLocations: boolean;
/** Whether customer locations exist */
hasCustomerLocations: boolean;
/** Whether locations are currently loading */
isLoading: boolean;
/** Error message if any */
error: string | null;
}
/**
* Props for Locations render prop component
*/
export interface LocationsProps {
children: (data: LocationsRenderProps) => React.ReactNode;
}
/**
* Core component that provides access to locations list via render props
*
* @component
* @example
* ```tsx
*
* {({ displayLocations, hasLocations, isLoading }) => (
* isLoading ? : displayLocations.map(...)
* )}
*
* ```
*/
export declare function Locations(props: LocationsProps): React.ReactNode;
/**
* Render props for Actions component
*/
export interface ActionsRenderProps {
/** Select a location */
select: (location: Location) => void;
/** Currently selected location (from BookingService) */
selectedLocation: Location | null;
}
/**
* Props for Actions render prop component
*/
export interface ActionsProps {
children: (actions: ActionsRenderProps) => React.ReactNode;
}
/**
* Core component that provides location actions via render props
*
* @component
* @example
* ```tsx
*
* {({ select, selectedLocation }) => (
*
* )}
*
* ```
*/
export declare function Actions(props: ActionsProps): React.ReactNode;