import { OnDestroy, OnInit, Renderer2 } from '@angular/core'; import { Router } from '@angular/router'; import { ConfService } from '../../services/conf.service'; import { LanguageService } from '../../services/language.service'; import { ContactUsService } from '../../services/contact-us.service'; import { CheckoutService } from '../../checkout/services/checkout.service'; import { LoginService } from '../../services/login.service'; import * as i0 from "@angular/core"; /** * Delivery-area selection popup with three cascading dropdowns shown to the customer as * City -> Area -> Sub-area. These map onto the existing DB hierarchy Country -> City -> Area * (the store re-enters its data at those levels). The deepest pick (an Area entity) resolves to a * delivery branch server-side (area -> zone -> branch); the resulting branch is persisted to * localStorage using the same contract as the existing branch popups. Rendered inline via *ngIf * (see app.component.html), scoped to the area-popup stores (fork-mart, mypapers). */ export declare class AreaBranchSelectorComponent implements OnInit, OnDestroy { protected confService: ConfService; protected languageService: LanguageService; protected contactUsService: ContactUsService; protected checkoutService: CheckoutService; protected loginService: LoginService; protected router: Router; private renderer; language: {}; cityItems: any[]; areaItems: any[]; subAreaItems: any[]; selectedCityId: number; selectedAreaId: number; selectedSubAreaCode: string; error: string; loadingAreas: boolean; loadingSubAreas: boolean; submitting: boolean; isLoggedIn: boolean; savedAddresses: any[]; loadingSavedAddresses: boolean; selectedSavedAddressId: number; usingSavedAddress: boolean; savedAddressError: string; savedAddressInvalidBranch: boolean; get invalidBranchMessage(): string; /** * Mandatory until a COMPLETE selection exists: the popup can only be dismissed once a full branch * object (with .area) is cached - i.e. the customer already picked City/Area/Sub-area here. A bare * cached branchId (e.g. from the old branch-list flow) does not count. */ canClose: boolean; static hasValidDeliverySelection(): boolean; private presetCityId; private presetAreaId; private presetSubAreaCode; private subs; constructor(confService: ConfService, languageService: LanguageService, contactUsService: ContactUsService, checkoutService: CheckoutService, loginService: LoginService, router: Router, renderer: Renderer2); ngOnInit(): void; /** * Fetch the customer's saved addresses. When present, auto-select the previously used one * (cached in localStorage) or the first address, so the popup offers a one-click alternative to * the City/Governorate/Area dropdowns. */ loadSavedAddresses(): void; get hasSavedAddresses(): boolean; /** Human-readable one-line summary of a saved address for the select options. */ savedAddressLabel(a: any): string; /** * Resolve the branch from the chosen saved address' area code (same contract as confirm()), cache * the address id so the checkout addressing form auto-fills the same address, then reload. */ useSavedAddress(): void; /** Redirect to the login page; on success the customer returns here and the popup re-opens. */ goToLogin(): void; /** Redirect to the profile address book so a logged-in customer with no addresses can add one. */ goToAddAddress(): void; onCityChange(countryId: number): void; onAreaChange(cityId: number): void; confirm(): void; get isArabic(): boolean; get governorateLabel(): string; get cityLabel(): string; get areaLabel(): string; /** * Type-ahead filtering for the location dropdowns. Matches against the text actually shown * (the current-locale translation) and the code, so typing works in Arabic too - ng-select's * default search only looks at bindLabel. An empty term matches everything, so clearing the * input restores the full list. */ searchLocation: (term: string, item: any) => boolean; /** Prefer the current-locale translation, fall back to the default name. */ label(item: any): string; close(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }