"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.convertCustomMetricToDbt = convertCustomMetricToDbt;
const field_1 = require("../types/field");
const filterGrammarConversion_1 = require("../types/filterGrammarConversion");
const formatting_1 = require("./formatting");
function convertCustomMetricToDbt(field) {
    const filters = (0, filterGrammarConversion_1.convertMetricFilterToDbt)(field.filters);
    return {
        label: field.label || (0, field_1.friendlyName)(field.name),
        description: field.description,
        type: field.type,
        format: (0, formatting_1.getFormatExpression)(field),
        percentile: field.percentile,
        filters,
    };
}
//# sourceMappingURL=convertCustomMetricsToYaml.js.map