import Includes from "../BaseDatabase/Includes";
import RollingTime from "../RollingTime/RollingTime";
export class MonitorStepMetricMonitorUtil {
    static getDefault() {
        return {
            metricViewConfig: {
                queryConfigs: [],
                formulaConfigs: [],
            },
            rollingTime: RollingTime.Past1Minute,
            entityKeys: [],
        };
    }
    /*
     * Stamps the step's entity scope onto a per-queryConfig Query<Metric>.
     * Compiles to hasAny(entityKeys, [...]) server-side. Undefined/empty is
     * a no-op so monitors saved before the field existed are unaffected.
     */
    static applyEntityScopeToQuery(query, monitor) {
        if (monitor.entityKeys && monitor.entityKeys.length > 0) {
            query.entityKeys = new Includes(monitor.entityKeys);
        }
        return query;
    }
    static fromJSON(json) {
        return json;
    }
    static toJSON(monitor) {
        return monitor;
    }
}
//# sourceMappingURL=MonitorStepMetricMonitor.js.map