import { BasicFormatter } from "./basic";
import { DateTimeFormatter } from "./date-time";
import { NumberFormatter } from "./number";
import { RelativeDateFormatter, } from "./relative-date-time";
export class InfoTileFormatterFactory {
    constructor(locale) {
        this.locale = locale;
    }
    createFormatter(format, value) {
        if ((format === null || format === void 0 ? void 0 : format.type) === 'number' && typeof value === 'number') {
            return new NumberFormatter(this.locale);
        }
        if ((format === null || format === void 0 ? void 0 : format.type) === 'date' && typeof value === 'string') {
            return new DateTimeFormatter(this.locale);
        }
        if ((format === null || format === void 0 ? void 0 : format.type) === 'relative-date' && typeof value === 'string') {
            return new RelativeDateFormatter(this.locale);
        }
        return new BasicFormatter(this.locale);
    }
}
