export class ColumnSizesService {
    constructor(params) {
        this.storage = params.storage;
        this.fqdn = params.fqdn;
        this.errorHandler = params.errorHandler;
        this.storageKey = `cairo-column-sizes`;
    }
    async fetchColumnSizes() {
        const { storage, storageKey } = this;
        try {
            const data = await storage.getItem(storageKey);
            return data;
        }
        catch (error) {
            return null;
        }
    }
    async updateColumnWidths(columnWidths) {
        const { storage, storageKey, errorHandler } = this;
        await errorHandler.withErrorHandler(() => {
            return storage.setItem(storageKey, { columnWidths });
        }, {});
    }
}
//# sourceMappingURL=columnSizesService.js.map