var t=({i18n:t,incentives:n,formattedTotalAmount:r})=>{if(!n||0===n.length)return;const o=n.find(e),i=n.find(a),c=o?.displayName;if(!o||!c)return;const m=t.formatCurrency(o.expectedAmount.amount,{currency:o.expectedAmount.currencyCode});if(i){const e=t.formatCurrency(i.cashbackAmount.amount,{currency:i.cashbackAmount.currencyCode});return{title:t.translate("shop_cash.rewards_banner_title",{formattedAmount:r}),description:t.translate("shop_cash.reward_banner_description_combined_rewards",{promotionAmount:m,promotionDisplayName:c,offerAmount:e})}}const s=o.remainingRewardLimit?.amount===o.expectedAmount.amount;return{title:t.translate("shop_cash.reward_banner_title_with_promotion_attribution",{formattedAmount:m,promotionDisplayName:c}),description:s?t.translate("shop_cash.reward_banner_description_max"):void 0}},e=t=>(t=>"ShopCashCheckoutCashbackIncentive"===t.__typename)(t)&&t.expectedAmount.amount>0,n=t=>"ShopCashCheckoutFlatAmountCashbackIncentive"===t.__typename,a=t=>n(t)&&t.minimumOrderValueSatisfied;export{e as i,n,a as r,t};