import { Popup, LngLatLike, Map, PopupOptions, PointLike } from 'maplibre-gl'; import { Nullable } from '../../types'; import { ComputedRef, Ref, MaybeRef } from 'vue'; /** * Popup creation status enum for better state management */ export declare enum PopupStatus { NotCreated = "not-created", Creating = "creating", Created = "created", Open = "open", Closed = "closed", Error = "error" } interface PopupEventHandlers { open?: (popup: Popup) => void; close?: (popup: Popup) => void; } interface CreatePopupProps { map: MaybeRef>; options?: PopupOptions; el?: Ref; lnglat?: MaybeRef; show?: boolean; withMap?: boolean; html?: MaybeRef; on?: PopupEventHandlers; debug?: boolean; autoCreate?: boolean; closeOnClick?: boolean; closeButton?: boolean; } interface CreatePopupActions { popup: ComputedRef>; popupStatus: ComputedRef; isPopupCreated: ComputedRef; isPopupOpen: ComputedRef; setLngLat: (lnglat: LngLatLike) => void; setOffset: (offset: PointLike) => void; addClassName: (className: string) => void; removeClassName: (className: string) => void; setMaxWidth: (width: string) => void; show: () => void; hide: () => void; toggle: () => void; addToMap: () => void; setHTMLContent: (html?: string) => void; setDOMContent: (element: HTMLElement) => void; setText: (text: string) => void; removePopup: () => void; createPopup: () => void; getLngLat: () => LngLatLike | null; getElement: () => HTMLElement | null; } /** * Composable for managing MapLibre GL Popups * Provides reactive popup with error handling, performance optimizations, and enhanced API * * @param props - Configuration options for the popup * @returns Enhanced actions and state for the popup */ export declare function useCreatePopup({ map: mapRef, lnglat: lnglatVal, html, el, show: showVal, withMap: withMapVal, options, on, debug, autoCreate, closeOnClick, closeButton, }: CreatePopupProps): CreatePopupActions; export {};