export var DisputeEvidenceDocumentType;
(function (DisputeEvidenceDocumentType) {
    DisputeEvidenceDocumentType["activity_log"] = "activity_log";
    DisputeEvidenceDocumentType["cancellationPolicy"] = "cancellation_policy";
    DisputeEvidenceDocumentType["customerCommunication"] = "customer_communication";
    DisputeEvidenceDocumentType["customerSignature"] = "customer_signature";
    DisputeEvidenceDocumentType["duplicateChargeDocumentation"] = "duplicate_charge_documentation";
    DisputeEvidenceDocumentType["receipt"] = "receipt";
    DisputeEvidenceDocumentType["refundPolicy"] = "refund_policy";
    DisputeEvidenceDocumentType["serviceDocumentation"] = "service_documentation";
    DisputeEvidenceDocumentType["shippingDocumentation"] = "shipping_documentation";
    DisputeEvidenceDocumentType["uncategorizedFile"] = "uncategorized_file";
})(DisputeEvidenceDocumentType || (DisputeEvidenceDocumentType = {}));
export class DisputeEvidenceDocument {
    set presignedUrl(url) {
        this._presignedUrl = url;
    }
    get presignedUrl() {
        return this._presignedUrl;
    }
    async getFileString() {
        const fileDataPromise = new Promise((resolve, reject) => {
            const reader = new FileReader();
            reader.onload = (e) => {
                resolve(e.target.result);
            };
            reader.onerror = () => {
                reject(new Error('Error reading file'));
            };
            reader.readAsArrayBuffer(this._file);
        });
        return await fileDataPromise;
    }
    ;
    constructor(file, dispute_evidence_type) {
        this._file = file;
        this.file_name = file.name;
        this.file_type = file.type;
        this.dispute_evidence_type = dispute_evidence_type;
    }
}
