import { IHubGroup, IHubGroupEditor } from "../core/types/IHubGroup";
import { IWithStoreBehavior } from "../core/behaviors/IWithStoreBehavior";
import { IWithPermissionBehavior } from "../core/behaviors/IWithPermissionBehavior";
import type { IArcGISContext } from "../types/IArcGISContext";
import { IEditorConfig } from "../core/schemas/types";
import { IWithEditorBehavior } from "../core/behaviors/IWithEditorBehavior";
import { GroupEditorType } from "./_internal/groupEditorTypes";
import { IEntityEditorContext } from "../core/types/HubEntityEditor";
import { IEntityPermissionPolicy } from "../permissions/types/IEntityPermissionPolicy";
import { IPermissionAccessResponse } from "../permissions/types/IPermissionAccessResponse";
import { Permission } from "../permissions/types/Permission";
/**
 * Hub Group Class
 */
export declare class HubGroup implements IWithStoreBehavior<IHubGroup>, IWithPermissionBehavior, IWithEditorBehavior {
    protected context: IArcGISContext;
    protected entity: IHubGroup;
    protected isDestroyed: boolean;
    protected thumbnailCache: {
        file?: any;
        filename?: string;
        clear?: boolean;
    };
    private constructor();
    /**
     * Whether the user can edit the group,
     * only the owner or admins of the group can
     */
    get canEdit(): boolean;
    /**
     * Whether the user can delete the group
     * only the owner or admins of the group can
     */
    get canDelete(): boolean;
    /**
     * Whether the group is protected, if so, it can't be deleted
     */
    get isProtected(): boolean;
    /**
     * Create an instance from an IHubGroup object
     * @param json - JSON object to create a HubGroup from
     * @param context - ArcGIS context
     * @returns
     */
    static fromJson(json: Partial<IHubGroup>, context: IArcGISContext): HubGroup;
    /**
     * Create a new HubGroup, returning a HubGroup instance.
     * Note: This does not persist the Group into the backing store
     * @param partialGroup
     * @param context
     * @returns
     */
    static create(partialGroup: Partial<IHubGroup>, context: IArcGISContext, save?: boolean): Promise<HubGroup>;
    /**
     * Fetch a Group from the backing store and return a HubGroup instance.
     * @param identifier - Identifier of the group to load
     * @param context
     * @returns
     */
    static fetch(identifier: string, context: IArcGISContext): Promise<HubGroup>;
    private static applyDefaults;
    /**
     * Return the backing entity as an object literal
     */
    toJson(): IHubGroup;
    /**
     * Apply a new state to the instance
     * @param changes
     */
    update(changes: Partial<IHubGroup>): void;
    /**
     * Save the HubGroup to the backing store
     * @returns
     */
    save(): Promise<void>;
    /**
     * Delete the HubGroup from the store
     * set a flag to indicate that it is destroyed
     * @returns
     */
    delete(): Promise<void>;
    /**
     * Check if current user has a specific permission, accounting for
     * both system and entity level policies
     * @param permission
     * @returns
     */
    checkPermission(permission: Permission): IPermissionAccessResponse;
    /**
     * Get all policies related to a specific permission
     * @param permission
     * @returns
     */
    getPermissionPolicies(permission: Permission): IEntityPermissionPolicy[];
    /**
     * Add a policy to the entity
     * @param policy
     */
    addPermissionPolicy(policy: IEntityPermissionPolicy): void;
    /**
     * Remove a policy from the entity
     * @param permission
     * @param id
     */
    removePermissionPolicy(permission: Permission, id: string): void;
    getEditorConfig(i18nScope: string, type: GroupEditorType): Promise<IEditorConfig>;
    /**
     * Return the group as an editor object
     */
    toEditor(_editorContext?: IEntityEditorContext, include?: string[]): Promise<IHubGroupEditor>;
    /**
     * Load the group from the editor object
     * @param editor
     * @returns
     */
    fromEditor(editor: IHubGroupEditor): Promise<IHubGroup>;
}
