/** Resolve `chatConfig.costHistory` with defaults applied. */
export function resolveCostHistoryConfig(chatConfig) {
    var _a, _b, _c, _d;
    const cost = chatConfig.costHistory;
    return {
        enabled: (cost === null || cost === void 0 ? void 0 : cost.enabled) === true,
        title: ((_a = cost === null || cost === void 0 ? void 0 : cost.title) === null || _a === void 0 ? void 0 : _a.trim()) || undefined,
        scope: ((_b = cost === null || cost === void 0 ? void 0 : cost.scope) === null || _b === void 0 ? void 0 : _b.trim()) || undefined,
        showCost: (cost === null || cost === void 0 ? void 0 : cost.showCost) !== false,
        showTokens: (cost === null || cost === void 0 ? void 0 : cost.showTokens) !== false,
        badgeLabel: (_c = cost === null || cost === void 0 ? void 0 : cost.badgeLabel) !== null && _c !== void 0 ? _c : 'Currently building',
        summaryHint: ((_d = cost === null || cost === void 0 ? void 0 : cost.summaryHint) === null || _d === void 0 ? void 0 : _d.trim()) || undefined,
    };
}
