"use strict";
exports.id = 7000;
exports.ids = [7000];
exports.modules = {

/***/ 867000:
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {


var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", ({ value: true }));
exports.associatedLicense = void 0;
const pool_1 = __importDefault(__webpack_require__(541808));
// Return the id of a site license if it should be applied to projects that use
// the given shared document.  Otherwise, return null;
async function associatedLicense(public_path_id) {
    const pool = (0, pool_1.default)("short");
    const { rows } = await pool.query("SELECT site_license_id, disabled, unlisted FROM public_paths WHERE id=$1", [public_path_id]);
    const { disabled, unlisted, site_license_id } = rows[0] ?? {};
    if (site_license_id && !disabled && unlisted) {
        // These are the only conditions under which we would apply a license.
        // Apply site_license_id to project_id.
        return site_license_id;
    }
    return null;
}
exports.associatedLicense = associatedLicense;
//# sourceMappingURL=public-path.js.map

/***/ })

};
;