import * as _angular_core from '@angular/core';
import { ControlValueAccessor, Validators, NgControl, FormGroup, FormControl } from '@angular/forms';
import { AutoComplete } from 'primeng/autocomplete';
import { isInvalid } from '@masterteam/components';
import { ModalService } from '@masterteam/components/modal';

interface LocationValue {
    display_name?: string;
    address?: string;
    lat?: string | number;
    lon?: string | number;
    lng?: string | number;
    [key: string]: unknown;
}
declare function normalizeLocationValue(value: unknown): LocationValue | null;
declare function getLocationDisplayName(value: LocationValue | null): string;
declare function getLocationLongitude(value: LocationValue | null): string | number | undefined;

interface LocationFieldConfiguration {
    country?: string | {
        name?: string;
        code?: string;
        viewBox?: string;
    };
    viewBox?: string;
    nominatimBaseUrl?: string;
    [key: string]: unknown;
}
declare class LocationField implements ControlValueAccessor {
    readonly hint: _angular_core.InputSignal<string | undefined>;
    readonly label: _angular_core.InputSignal<string | undefined>;
    readonly placeholder: _angular_core.InputSignal<string | undefined>;
    readonly readonly: _angular_core.InputSignal<boolean>;
    readonly required: _angular_core.InputSignal<boolean>;
    readonly minLength: _angular_core.InputSignal<number>;
    readonly configuration: _angular_core.InputSignal<LocationFieldConfiguration | null>;
    readonly searchUrl: _angular_core.InputSignal<string | undefined>;
    protected readonly value: _angular_core.WritableSignal<LocationValue | null>;
    protected readonly suggestions: _angular_core.WritableSignal<LocationValue[]>;
    protected readonly disabled: _angular_core.WritableSignal<boolean>;
    protected readonly loading: _angular_core.WritableSignal<boolean>;
    protected readonly requiredValidator: typeof Validators.required;
    protected readonly autocomplete: _angular_core.Signal<AutoComplete | undefined>;
    protected readonly displayValue: _angular_core.Signal<string>;
    protected readonly resolvedSearchUrl: _angular_core.Signal<string>;
    protected readonly countryName: _angular_core.Signal<string>;
    protected readonly countryCode: _angular_core.Signal<string>;
    protected readonly viewBox: _angular_core.Signal<string>;
    ngControl: NgControl | null;
    protected readonly isInvalid: typeof isInvalid;
    private readonly modal;
    private readonly transloco;
    private readonly http;
    private readonly searchTerms;
    protected onTouched: () => void;
    private onModelChange;
    constructor();
    protected search(event: {
        query: string;
    }): void;
    protected onFocus(): void;
    protected onSelect(event: {
        originalEvent: Event;
        value: LocationValue;
    }): void;
    protected onClear(): void;
    protected openManualDialog(): void;
    writeValue(value: unknown): void;
    registerOnChange(fn: (value: LocationValue | null) => void): void;
    registerOnTouched(fn: () => void): void;
    setDisabledState(disabled: boolean): void;
    private setValue;
    private searchLocations;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocationField, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<LocationField, "mt-location-field", never, { "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "configuration": { "alias": "configuration"; "required": false; "isSignal": true; }; "searchUrl": { "alias": "searchUrl"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

declare class LocationManualDialog {
    readonly initialValue: _angular_core.InputSignal<LocationValue | null>;
    protected readonly modal: ModalService;
    private readonly ref;
    protected readonly form: FormGroup<{
        display_name: FormControl<string>;
        longitude: FormControl<number | null>;
        latitude: FormControl<number | null>;
    }>;
    constructor();
    protected cancel(): void;
    protected save(): void;
    static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocationManualDialog, never>;
    static ɵcmp: _angular_core.ɵɵComponentDeclaration<LocationManualDialog, "mt-location-manual-dialog", never, { "initialValue": { "alias": "initialValue"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
}

export { LocationField, LocationManualDialog, getLocationDisplayName, getLocationLongitude, normalizeLocationValue };
export type { LocationFieldConfiguration, LocationValue };
