"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const url_1 = require("url");
const contentDisposition = require("content-disposition");
function default_1(link) {
    var _a;
    const url = new url_1.URL(link);
    const disposition = url.searchParams.get('response-content-disposition');
    if (!disposition)
        return null;
    const parsedDisposition = contentDisposition.parse(disposition);
    return (_a = parsedDisposition === null || parsedDisposition === void 0 ? void 0 : parsedDisposition.parameters) === null || _a === void 0 ? void 0 : _a.filename;
}
exports.default = default_1;
//# sourceMappingURL=getFilenameFromUrl.js.map