type FilterableTable = {
    dimensions: Record<string, {
        tags?: string[];
    }>;
    metrics: Record<string, {
        tags?: string[];
    }>;
};
type FilterableExplore<T extends FilterableTable = FilterableTable> = {
    tags: string[];
    baseTable: string;
    tables: {
        [tableName: string]: T;
    };
};
/**
 * @description
 * Filters an explore based on available tags configured in AI settings.
 *
 * ## Base Table Requirement
 * An explore is only visible if the base table has matching tags at either:
 * - Explore level (explore.tags matches availableTags), OR
 * - Field level (at least one base table field has matching tags)
 *
 * ## Per-Table Filtering Modes
 * Each table in the explore is filtered independently:
 *
 * **Field-Level Mode** (if table has ANY field with tags defined):
 * - Expose only fields where field.tags matches availableTags
 * - Empty tags arrays (tags: []) activate this mode but match nothing
 *
 * **Explore-Level Mode** (if table has NO fields with tags defined):
 * - If explore.tags matches → expose ALL fields in this table
 * - If explore.tags doesn't match → expose NO fields (empty dimensions/metrics)
 *
 * ## Tagging Scenarios
 *
 * | Scenario                                        | Result                                    |
 * |-------------------------------------------------|-------------------------------------------|
 * | No tags configured (availableTags = null/[])    | Everything is visible                     |
 * | Explore tagged, no field tags                   | All tables/fields visible (explore-level) |
 * | Explore tagged, some fields tagged              | Per-table: field-level or explore-level   |
 * | No explore tag, base table fields tagged        | Only matching fields visible              |
 * | No explore tag, only joined table fields tagged | Explore hidden (base table requirement)   |
 * | No matching tags anywhere                       | Explore hidden                            |
 */
export declare function filterExploreByTags<E extends FilterableExplore>({ explore, availableTags, }: {
    explore: E;
    availableTags: string[] | null;
}): E | undefined;
export {};
//# sourceMappingURL=filterExploreByTags.d.ts.map