/*!
 * Copyright 2021 VMware, Inc.
 * SPDX-License-Identifier: BSD-2-Clause
 */
import { OnInit } from '@angular/core';
import { GroupType, OrgType, UserType } from '@vcd/bindings/vcloud/api/rest/schema_v1_5/index';
import { TranslationService } from '@vcd/i18n';
import { ComponentRenderer } from '../datagrid/interfaces/component-renderer.interface';
import { FilterBuilder } from '../utils/filter-builder';
import { RestQueryService } from '../utils/rest/rest-query-search.client';
import { SharingModalComponent } from './sharing-modal.component';
import { HasId, PredefinedSharingTab } from './tabs/sharing-modal-tab.component';
import * as i0 from "@angular/core";
/**
 * Given some search term, gives the complete filter.
 */
export declare type FilterCreator = (searchTerm: string) => FilterBuilder;
/**
 * A tab that knows how to communicate with the backend.
 */
export interface QueryableTab<T> extends PredefinedSharingTab<T> {
    /**
     * Gives the search term, provides the filter that will be sent to the backend.
     */
    filterCreator?: FilterCreator;
}
/**
 * A filter creator that knows how to filter by name.
 */
export declare const defaultFilterCreator: FilterCreator;
/**
 * Supplies convinece bindings to the `vcd-sharing-modal` for the use case
 * of selecting users, groups, and/or organizations to share with.
 *
 * Inputs only work if applied before rendering is complete. Not dynamic.
 */
export declare class UsersGroupsOrgsSharingModalDirective implements OnInit {
    private hostSharingModalComponent;
    private translationService;
    private client;
    /**
     * The configration for the users tab.
     * If unset, there will be no users tab.
     */
    set usersConfig(config: QueryableTab<unknown>);
    /**
     * The configration for the groups tab.
     * If unset, there will be no groups tab.
     */
    set groupsConfig(config: QueryableTab<unknown>);
    /**
     * The configration for the organizations tab.
     * If unset, there will be no organizations tab.
     */
    set orgsConfig(config: QueryableTab<unknown>);
    /**
     * If there should be a checkbox for selecting all users and groups.
     */
    set showSelectAllUsersAndGroups(isEnabled: boolean);
    /**
     * If there should be a checkbox for selecting all users.
     */
    set showSelectAllUsers(isEnabled: boolean);
    /**
     * If there should be a checkbox for selecting all groups
     */
    set showSelectAllGroups(isEnabled: boolean);
    /**
     * If there should be a checkbox for selecting all organizations.
     */
    set showSelectAllOrgs(isEnabled: boolean);
    private tabs;
    private toggles;
    constructor(hostSharingModalComponent: SharingModalComponent, translationService: TranslationService, client: RestQueryService);
    ngOnInit(): void;
    makeSearchGenerator<T extends string>(type: T, filterCreator: FilterCreator): (searchTerm: string) => Promise<{
        items: HasId<(T extends "user" ? UserType : T extends "organization" ? OrgType : T extends "group" ? GroupType : unknown)[]>[];
        totalCount: number;
    }>;
    static ɵfac: i0.ɵɵFactoryDeclaration<UsersGroupsOrgsSharingModalDirective, [null, null, { optional: true; }]>;
    static ɵdir: i0.ɵɵDirectiveDeclaration<UsersGroupsOrgsSharingModalDirective, "vcd-sharing-modal[vcdUsersGroupsOrgsSharingModal]", never, { "usersConfig": "usersConfig"; "groupsConfig": "groupsConfig"; "orgsConfig": "orgsConfig"; "showSelectAllUsersAndGroups": "showSelectAllUsersAndGroups"; "showSelectAllUsers": "showSelectAllUsers"; "showSelectAllGroups": "showSelectAllGroups"; "showSelectAllOrgs": "showSelectAllOrgs"; }, {}, never, never, false, never>;
}
export declare class SharingModalUserRenderComponent implements ComponentRenderer<HasId<UserType>> {
    config: HasId<UserType>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SharingModalUserRenderComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SharingModalUserRenderComponent, "vcd-sharing-modal-user-renderer", never, { "config": "config"; }, {}, never, never, false, never>;
}
export declare class SharingModalGroupRenderComponent implements ComponentRenderer<HasId<UserType>> {
    config: HasId<UserType>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SharingModalGroupRenderComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SharingModalGroupRenderComponent, "vcd-sharing-modal-group-renderer", never, { "config": "config"; }, {}, never, never, false, never>;
}
export declare class SharingModalOrgRenderComponent implements ComponentRenderer<HasId<UserType>> {
    config: HasId<UserType>;
    static ɵfac: i0.ɵɵFactoryDeclaration<SharingModalOrgRenderComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<SharingModalOrgRenderComponent, "vcd-sharing-modal-group-renderer", never, { "config": "config"; }, {}, never, never, false, never>;
}
