import { EventEmitter, OnInit } from '@angular/core'; import { BaseAngularComponent } from '@memberjunction/ng-base-types'; import { type EntityInfo } from '@memberjunction/core'; import type { MJListEntity, MJUserViewEntity } from '@memberjunction/core-entities'; import type { AudienceSource } from '@memberjunction/lists-base'; import * as i0 from "@angular/core"; /** * Reusable picker for an `AudienceSource` (mockup 20). Three tabs: * * - **List** — pick from saved `MJ: List`s for the chosen entity. * - **View** — pick from saved `MJ: User View`s for the chosen entity. * Marked "live" so the user knows the record set is re-resolved at * execution time. * - **Ad-hoc Filter** — entity + free-form `ExtraFilter`. Skips * server-side validation; the consumer can pre-flight via * `ResolveAudience` (Action) or `AudienceResolver.Resolve` if desired. * * Emits the typed `AudienceSource` via `SourceChange` on selection; the * sister `AudienceSourceSummaryComponent` renders the friendly summary. * Multi-provider safe via `BaseAngularComponent.ProviderToUse`. */ export type AudienceSourcePickerTab = 'list' | 'view' | 'adhoc'; export declare class AudienceSourcePickerComponent extends BaseAngularComponent implements OnInit { private readonly cdr; /** * Pre-seed the picker with an existing audience. Useful when editing * a previously-configured audience on a saved campaign. */ set Source(value: AudienceSource | null); get Source(): AudienceSource | null; private _source; /** When set, restrict the entity dropdown to this entity (lock it). */ LockedEntityName: string | null; SourceChange: EventEmitter; activeTab: AudienceSourcePickerTab; entityOptions: EntityInfo[]; selectedEntityName: string | null; availableLists: MJListEntity[]; filteredLists: MJListEntity[]; listSearch: string; selectedListId: string | null; availableViews: MJUserViewEntity[]; filteredViews: MJUserViewEntity[]; viewSearch: string; selectedViewId: string | null; adhocEntityName: string | null; adhocFilter: string; loading: boolean; ngOnInit(): Promise; setTab(tab: AudienceSourcePickerTab): Promise; OnEntityChange(name: string): Promise; OnListSearchChange(): void; OnViewSearchChange(): void; OnSelectList(list: MJListEntity): void; OnSelectView(view: MJUserViewEntity): void; OnAdhocFilterChange(): void; /** * Build the currently-selected `AudienceSource` from picker state, or * `null` if the picker isn't yet in a complete state. */ get currentSource(): AudienceSource | null; private emitCurrentSource; /** * Pull lists or views for the current tab from the server. We * intentionally batch the (list, view) pair on entity change so * switching tabs doesn't re-query. */ private refreshTabData; private recomputeFilteredLists; private recomputeFilteredViews; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } //# sourceMappingURL=audience-source-picker.component.d.ts.map