Skip to main content
Version: 5.5

RecipeDetailFooter

To create your own recipe detail footer template you create a class that implements RecipeDetailsFooterProtocol

import SwiftUI
import mealzcore
import MealziOSSDK

@available(iOS 14, *)
public struct MyCustomRecipeDetailsFooterView: RecipeDetailsFooterProtocol {
public func content(params: RecipeDetailsFooterParameters) -> some View {
// your imp here
}
}

with

public struct RecipeDetailsFooterParameters {
/// Total price of products in this recipe in your basket
public let totalPriceOfProductsAdded: Double
/// Total price of products in this recipe in your basket by guest
public let totalPriceOfProductsAddedPerGuest: Double
/// Total price of products in this recipe NOT in your basket
public let totalPriceOfRemainingProducts: Double
/// Price of the recipe from our API of expected products
public let recipeStickerPrice: Double
/// Number of guests set by the user
public let numberOfGuests: Int
/// UIState of price (loading, success, etc)
public let priceStatus: ComponentUiState
/// Ingredient Status (initialState, noMoreToAdd, remainingIngredientsToBeAdded)
public let ingredientsStatus: IngredientStatus
/// When the user presses "add all ingredients"
public let isAddingAllIngredients: Bool
/// Only show ingredients & steps, NOT Products
public let cookOnlyMode: Bool
/// Current tab, either Shopping (with products) or Cooking (ingredients & steps)
public let currentSelectedTab: SelectedControlPage
/// Will add all items to basket or close page if they're already added
public let callToAction: () -> Void