
import * as path from "path";
import { IMAPFetchFoldersOperationNativeBinding } from "../types";
import { NodeTrustedMailcore2NativeBinding } from '../types/NodeTrustedMailcore2NativeBinding'

// tslint:disable-next-line: no-var-requires
let bindings: NodeTrustedMailcore2NativeBinding;
try {
    bindings = require(path.join(__dirname, "../../lib/binding/trusted_mailcore2.node"));
} catch(e) {
    bindings = require(path.join(__dirname, "../../lib/binding/trusted_mailcore2_no_crypto.node"));
}


// tslint:disable-next-line
const { IMAPFetchFoldersOperation: _IMAPFetchFoldersOperation } = bindings

/**
 * IMAPFetchFoldersOperation Class
 *
 * @public
 */
class IMAPFetchFoldersOperation extends bindings.IMAPFetchFoldersOperation {
    protected handle: IMAPFetchFoldersOperationNativeBinding

    constructor() {
        super()

        const handle = new _IMAPFetchFoldersOperation();
        this.handle = handle;
    }

    folders() {
        return this.handle.folders();
    }
}

export { IMAPFetchFoldersOperation }
