/** * Location List Service Definition * Defines types and service interface for managing location lists * * @module Services/LocationList/Definition */ import type { Signal, ReadOnlySignal } from '@wix/services-definitions/core-services/signals'; import { LocationTypeEnumLocationType as LocationType, type Service } from '@wix/auto_sdk_bookings_services'; /** * Location type from the SDK * Represents a service location (BUSINESS, CUSTOM, or CUSTOMER type) */ export type Location = NonNullable[number]; /** * Actions interface for location list management */ export interface LocationListActions { /** Select a location (updates BookingService.location if available) */ select: (location: Location) => void; } /** * API interface for the LocationList service */ export interface LocationListServiceAPI { /** Reactive signal containing the raw locations array */ locations: Signal; /** Reactive signal containing the display locations (processed for UI) */ displayLocations: ReadOnlySignal; /** Whether custom locations exist */ hasCustomLocations: ReadOnlySignal; /** Whether customer locations exist */ hasCustomerLocations: ReadOnlySignal; /** Reactive signal indicating if locations are loading */ isLoading: Signal; /** Reactive signal containing any error message */ error: Signal; /** Computed signal for selected location (from BookingService, null if standalone) */ selectedLocation: ReadOnlySignal; /** Custom label for CUSTOM location type (used as fallback when no name exists) */ customLocationLabel: ReadOnlySignal; /** Custom label for CUSTOMER location type (used as fallback when no name exists) */ customerLocationLabel: ReadOnlySignal; /** Actions for location management */ actions: LocationListActions; } /** * Service definition for LocationList */ export declare const LocationListServiceDefinition: string & { __api: LocationListServiceAPI; __config: {}; isServiceDefinition?: boolean; } & LocationListServiceAPI; export { LocationType };