import Sortable from 'sortablejs';
import { EventEmitter } from '../../../stencil-public-runtime';
import { IRole, ITemplate, VerdocsEndpoint } from '@verdocs/js-sdk';
import { SDKError } from '../../../utils/errors';
/**
 * Display an edit form that allows the user to adjust a template's roles and workflow.
 */
export declare class VerdocsTemplateRoles {
    private templateListenerId;
    el: HTMLElement;
    /**
     * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
     */
    endpoint: VerdocsEndpoint;
    /**
     * The template ID to edit.
     */
    templateId: string;
    /**
     * Event fired when the user clicks to proceed.
     */
    next: EventEmitter;
    /**
     * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
     */
    exit: EventEmitter;
    /**
     * Event fired if an error occurs. The event details will contain information about the error. Most errors will
     * terminate the process, and the calling application should correct the condition and re-render the component.
     */
    sdkError: EventEmitter<SDKError>;
    /**
     * Event fired when the template is updated in any way. May be used for tasks such as cache invalidation or reporting to other systems.
     */
    rolesUpdated: EventEmitter<{
        endpoint: VerdocsEndpoint;
        templateId: string;
        event: 'added' | 'deleted' | 'updated';
        roles: IRole[];
    }>;
    showingRoleDialog: string | null;
    sender: any;
    dragging: boolean;
    loading: boolean;
    template: ITemplate | null;
    disconnectedCallback(): void;
    listenToTemplate(): Promise<void>;
    unlistenToTemplate(): void;
    componentWillLoad(): Promise<void>;
    sortableRefs: Sortable[];
    cleanupSortables(): void;
    componentDidRender(): void;
    handleMoveEnd(evt: any): Promise<void>;
    handleCancel(): void;
    handleSubmit(): void;
    getSortedRoles(): IRole[];
    getSequenceNumbers(): number[];
    getRoleNames(): string[];
    getRolesAtSequence(sequence: number): IRole[];
    renumberTemplateRoles(): Promise<void>;
    getNextRoleName(): string;
    callCreateRole(name: string, sequence: number, order: number): void;
    handleAddRole(e: any, sequence: number): void;
    handleAddStep(e: any, sequence: number): void;
    render(): any;
}
