"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Attachment = void 0;
const tslib_1 = require("tslib");
const path = tslib_1.__importStar(require("path"));
// tslint:disable-next-line: no-var-requires
let bindings;
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 { Attachment: _Attachment } = bindings;
/**
 * Attachment Class
 *
 * @public
 */
class Attachment extends bindings.Attachment {
    constructor(bufData, fileName) {
        super();
        const handle = new _Attachment(bufData, fileName);
        this.handle = handle;
    }
    /**
     * Part ID getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get partId() {
        return this.handle.partId;
    }
    /**
     * Part ID setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set partId(prtId) {
        this.handle.partId = prtId;
    }
    /**
     * data getter
     *
     *
     * @type {Buffer}
     * @memberof Attachment
     */
    get data() {
        return this.handle.data;
    }
    /**
     * data setter
     *
     *
     * @type {Buffer}
     * @memberof Attachment
     */
    set data(val) {
        this.handle.data = val;
    }
    /**
     * decodedString getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get decodedString() {
        return this.handle.decodedString;
    }
    /**
     * File name getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get filename() {
        return this.handle.filename;
    }
    /**
     * File name setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set filename(val) {
        this.handle.filename = val;
    }
    /**
     * MIME type getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get mimeType() {
        return this.handle.mimeType;
    }
    /**
     * MIME type setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set mimeType(val) {
        this.handle.mimeType = val;
    }
    /**
     * Charset getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get charset() {
        return this.handle.charset;
    }
    /**
     * Charset setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set charset(val) {
        this.handle.charset = val;
    }
    /**
     * Uniqe ID getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get uniqeID() {
        return this.handle.uniqeID;
    }
    /**
     * Uniqe ID setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set uniqeID(val) {
        this.handle.uniqeID = val;
    }
    /**
     * Content ID getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get contentID() {
        return this.handle.contentID;
    }
    /**
     * Content ID setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set contentID(val) {
        this.handle.contentID = val;
    }
    /**
     * Content location getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get contentLocation() {
        return this.handle.contentLocation;
    }
    /**
     * Content location setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set contentLocation(val) {
        this.handle.contentLocation = val;
    }
    /**
     * Content description getter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    get contentDescription() {
        return this.handle.contentDescription;
    }
    /**
     * Content description setter
     *
     *
     * @type {string}
     * @memberof Attachment
     */
    set contentDescription(val) {
        this.handle.contentDescription = val;
    }
}
exports.Attachment = Attachment;
//# sourceMappingURL=Attachment.js.map