"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.structuralPressureThresholdValues = structuralPressureThresholdValues;
exports.renderStructuralPressureThresholdFamilyValues = renderStructuralPressureThresholdFamilyValues;
exports.renderStructuralPressureCandidateThresholdValues = renderStructuralPressureCandidateThresholdValues;
exports.renderStructuralPressureThresholdFamilyProvenance = renderStructuralPressureThresholdFamilyProvenance;
function structuralPressureThresholdValues(thresholdFamily) {
    return {
        watch: thresholdFamily.watch.value,
        pressure: thresholdFamily.pressure.value,
        hotspot: thresholdFamily.hotspot.value
    };
}
function renderStructuralPressureThresholdFamilyValues(thresholdFamily) {
    return [
        thresholdFamily.watch.value,
        thresholdFamily.pressure.value,
        thresholdFamily.hotspot.value
    ].join("/");
}
function renderStructuralPressureCandidateThresholdValues(threshold) {
    return `watch/pressure/hotspot = ${threshold.watch}/${threshold.pressure}/${threshold.hotspot} lines`;
}
function renderStructuralPressureThresholdFamilyProvenance(thresholdFamily) {
    return [
        `watch=${renderThresholdProvenance(thresholdFamily.watch)}`,
        `pressure=${renderThresholdProvenance(thresholdFamily.pressure)}`,
        `hotspot=${renderThresholdProvenance(thresholdFamily.hotspot)}`
    ].join(", ");
}
function renderThresholdProvenance(threshold) {
    const layer = threshold.sourceLayer === undefined ? "" : `/${threshold.sourceLayer}`;
    const sourcePath = threshold.sourcePath === undefined ? "" : ` at ${threshold.sourcePath}`;
    return `${threshold.sourceKind}${layer}${sourcePath} (${threshold.sourceDescription})`;
}
