import * as i0 from "@angular/core"; import { OnDestroy, OnInit } from "@angular/core"; import { Observable } from "rxjs"; import { AbstractAccountSummaryBaseComponent } from "@hmcts/opal-frontend-common/components/abstract/abstract-account-summary-base"; import { ITransformItem } from "@hmcts/opal-frontend-common/services/transformation-service/interfaces"; interface CreditorDetailsAccountStore { account_id(): number | string | null | undefined; business_unit_id(): number | string | null | undefined; clearSuccessMessage(): void; compareVersion(version: string | null): void; setHasVersionMismatch(value: boolean): void; setSuccessMessage(message: string | null): void; } interface CreditorDetailsPayloadTransformer { transformPayload(payload: T, transformItemsConfig: ITransformItem[]): T; } export declare abstract class AbstractCreditorDetailsBaseComponent extends AbstractAccountSummaryBaseComponent implements OnInit, OnDestroy { protected abstract readonly headerDataRouteKey: string; protected abstract readonly defaultActiveTab: string; protected abstract readonly transformItemsConfig: ITransformItem[]; protected abstract readonly latestBannerMessage: string; protected abstract readonly permissions: Record; protected abstract readonly payloadTransformer: CreditorDetailsPayloadTransformer; abstract readonly accountStore: CreditorDetailsAccountStore; accountId: number; /** * Gets the active account ID from the consuming application's route shape. * @returns The active account ID from the route. */ protected abstract getAccountIdFromRoute(): number; /** * Fetches tab data through the shared summary cache flow and applies account version comparison. * @param serviceCall The typed service call used to retrieve tab data. * @returns The tab data observable with the caller's concrete tab type preserved. */ protected fetchTabDataTyped(serviceCall: Observable): Observable; /** * Reads creditor heading data resolved on the route, transforms it for display and store state, * and sets the active tab from the URL fragment. */ protected getHeaderDataFromRoute(): void; /** * Transforms payload data using the consuming application's transformation service and configuration. * @param payload The payload to transform using the configured payload transformer. * @returns The transformed payload. */ protected transformPayload(payload: T): T; /** * Transforms creditor heading data from the API shape into the view shape. * @param header The creditor heading data to transform. * @returns The transformed creditor heading data for display. */ protected transformHeaderForView(header: THeader): THeader; /** * Transforms creditor tab data from the API shape into the view shape. * @param data The tab data to transform. * @returns The transformed tab data with the original tab type preserved. */ protected transformTabData(data: T): T; /** * Refreshes the current creditor summary page and updates store state after the latest header is loaded. */ refreshPage(): void; /** * Checks whether the current user has the requested permission for the active account business unit. * @param permissionKey The key used to look up the permission ID. * @returns True when the user has the permission for the account business unit. */ hasBusinessUnitPermissionKey(permissionKey: string): boolean; /** * Clears transient account summary store flags before the component is destroyed. */ ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "ng-component", never, {}, {}, never, never, true, never>; }