"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const DistanceUnitType_types_1 = require("../models/Client/Hotel/DistanceUnitType.types");
class DistanceProvider {
    /**
     * App assumes that all inputs written are Metric, as that is the best form of measurement 🦆
     *
     * Will convert KM to Miles.
     *
     * @param value amount in KILOMETERS
     * @param to
     */
    static convertTo(type, value) {
        if (type === 'imperial') {
            return (value * 0.621371).toFixed(1);
        }
        return value;
    }
    static getMeasurementString(type) {
        switch (type) {
            case DistanceUnitType_types_1.DistanceUnitType.Imperial:
                return 'miles';
            case DistanceUnitType_types_1.DistanceUnitType.Time:
                return 'minutes';
            default:
            case DistanceUnitType_types_1.DistanceUnitType.Metric:
                return 'km';
        }
    }
}
exports.default = DistanceProvider;
//# sourceMappingURL=DistanceProvider.js.map