{
  "id": "mod_whiskey_handbook",
  "type": "module",
  "version": "1.0",
  "context": {
    "title": "Whiskey Handbook",
    "icon": "🥃",
    "layout": "phone"
  },
  "state": {
    "query": "",
    "focused": "",
    "entries": [
      {
        "name": "Scotch Whisky",
        "page": "Scotch_whisky",
        "region": "Scotland",
        "kind": "Malt or grain whisky made in Scotland"
      },
      {
        "name": "Bourbon Whiskey",
        "page": "Bourbon_whiskey",
        "region": "United States",
        "kind": "Corn-forward American whiskey"
      },
      {
        "name": "Irish Whiskey",
        "page": "Irish_whiskey",
        "region": "Ireland",
        "kind": "Usually triple-distilled, smooth style"
      },
      {
        "name": "Rye Whiskey",
        "page": "Rye_whiskey",
        "region": "United States / Canada",
        "kind": "Spicier whiskey led by rye grain"
      },
      {
        "name": "Japanese Whisky",
        "page": "Japanese_whisky",
        "region": "Japan",
        "kind": "Precision-focused whisky inspired by Scotch traditions"
      },
      {
        "name": "Single Malt Whisky",
        "page": "Single_malt_whisky",
        "region": "Various regions",
        "kind": "Made from malted barley at one distillery"
      },
      {
        "name": "Blended Whiskey",
        "page": "Blended_whiskey",
        "region": "Various regions",
        "kind": "Blend of different whiskies for balance and consistency"
      },
      {
        "name": "Tennessee Whiskey",
        "page": "Tennessee_whiskey",
        "region": "United States",
        "kind": "Tennessee-made style, often charcoal mellowed"
      },
      {
        "name": "Canadian Whisky",
        "page": "Canadian_whisky",
        "region": "Canada",
        "kind": "Often lighter-bodied and blend-oriented"
      },
      {
        "name": "Corn Whiskey",
        "page": "Corn_whiskey",
        "region": "United States",
        "kind": "American whiskey made mostly from corn"
      }
    ]
  },
  "dependencies": [
    {
      "repository": {
        "remote": {
          "id": "wiki_api",
          "config": {
            "endPoint": "https://en.wikipedia.org/api/rest_v1/page/summary"
          }
        }
      }
    }
  ],
  "children": [
    {
      "id": "wh_nav",
      "type": "navigation",
      "children": [
        {
          "id": "wh_root_scroll",
          "type": "scroll",
          "style": {
            "layout": {
              "maxWidth": "infinity",
              "maxHeight": "infinity"
            },
            "scroll": {
              "dismissesKeyboard": "interactively"
            },
            "common": {
              "background": {
                "gradient": {
                  "linear": {
                    "colors": [
                      "#16110E",
                      "#251A14",
                      "#3A271C"
                    ],
                    "startPoint": "top",
                    "endPoint": "bottom"
                  }
                }
              }
            },
            "navigation": {
              "navigationTitle": "Whiskey Handbook",
              "navigationBarTitleDisplayMode": "large"
            }
          },
          "children": [
            {
              "id": "wh_content_stack",
              "type": "vstack",
              "context": {
                "_spacing": 18,
                "_alignment": "leading"
              },
              "style": {
                "layout": {
                  "padding": {
                    "top": 12,
                    "bottom": 28,
                    "leading": 16,
                    "trailing": 16
                  },
                  "maxWidth": "infinity"
                }
              },
              "children": [
                {
                  "id": "wh_intro_card",
                  "type": "vstack",
                  "context": {
                    "_spacing": 10,
                    "_alignment": "leading"
                  },
                  "style": {
                    "layout": {
                      "maxWidth": "infinity",
                      "padding": 18
                    },
                    "common": {
                      "background": {
                        "gradient": {
                          "linear": {
                            "colors": [
                              "#8B5A2B",
                              "#6F3F1E",
                              "#4A2C1D"
                            ],
                            "startPoint": "topLeading",
                            "endPoint": "bottomTrailing"
                          }
                        }
                      },
                      "foreground": {
                        "color": "white"
                      },
                      "cornerRadius": 22,
                      "glass": "regular"
                    },
                    "shadow": {
                      "color": {
                        "color": "black",
                        "opacity": 0.22
                      },
                      "radius": 12,
                      "y": 6
                    }
                  },
                  "children": [
                    {
                      "id": "wh_intro_row",
                      "type": "hstack",
                      "context": {
                        "_spacing": 10,
                        "_alignment": "center"
                      },
                      "children": [
                        {
                          "id": "wh_intro_icon",
                          "type": "image",
                          "context": {
                            "_source": "sf://wineglass"
                          },
                          "style": {
                            "layout": {
                              "width": 22,
                              "height": 22
                            },
                            "common": {
                              "foreground": {
                                "color": "white"
                              }
                            }
                          }
                        },
                        {
                          "id": "wh_intro_heading",
                          "type": "text",
                          "context": {
                            "_text": "Browse whiskey styles"
                          },
                          "style": {
                            "common": {
                              "font": {
                                "kind": "headline",
                                "weight": "bold"
                              },
                              "foreground": {
                                "color": "white"
                              }
                            }
                          }
                        }
                      ]
                    },
                    {
                      "id": "wh_intro_text",
                      "type": "text",
                      "context": {
                        "_text": "A compact handbook of major whiskey categories. Open any entry for a short description and, when available, an image from Wikipedia."
                      },
                      "style": {
                        "common": {
                          "font": "subheadline",
                          "foreground": {
                            "color": {
                              "color": "white",
                              "opacity": 0.86
                            }
                          }
                        },
                        "text": {
                          "lineSpacing": 2
                        }
                      }
                    },
                    {
                      "id": "wh_scope_note",
                      "type": "text",
                      "context": {
                        "_text": "Search is scoped to whiskey topics only."
                      },
                      "style": {
                        "common": {
                          "font": "caption",
                          "foreground": {
                            "color": {
                              "color": "white",
                              "opacity": 0.72
                            }
                          }
                        }
                      }
                    }
                  ]
                },
                {
                  "id": "wh_search_card",
                  "type": "vstack",
                  "context": {
                    "_spacing": 10,
                    "_alignment": "leading"
                  },
                  "style": {
                    "layout": {
                      "maxWidth": "infinity",
                      "padding": 16
                    },
                    "common": {
                      "background": {
                        "light": "#FFF8F1",
                        "dark": "#211814"
                      },
                      "cornerRadius": 20
                    },
                    "shadow": {
                      "color": {
                        "color": "black",
                        "opacity": 0.14
                      },
                      "radius": 10,
                      "y": 5
                    }
                  },
                  "children": [
                    {
                      "id": "wh_search_label",
                      "type": "label",
                      "context": {
                        "_title": "Find a whiskey style",
                        "_image": "sf://magnifyingglass"
                      },
                      "style": {
                        "common": {
                          "font": "headline",
                          "foreground": {
                            "light": "#2B1D15",
                            "dark": "#F7E8DB"
                          }
                        }
                      }
                    },
                    {
                      "id": "wh_search_field",
                      "type": "textfield",
                      "context": {
                        "_label": "Search by name or region",
                        "_text": "${query}",
                        "_focused": "${focused}",
                        "_debounce": 0
                      },
                      "style": {
                        "textField": {
                          "standard": "roundedBorder"
                        },
                        "common": {
                          "foreground": {
                            "light": "#1F140E",
                            "dark": "#FFF7EF"
                          }
                        }
                      }
                    },
                    {
                      "id": "wh_search_hint",
                      "type": "text",
                      "context": {
                        "_text": "{{ empty(${query}) ? 'Try Scotch, bourbon, Irish, Japanese, rye…' : cast(count(${entries[name ~ ${query}]} + ${entries[region ~ ${query}]}), 'str') + ' matches may appear because search checks both name and region.' }}"
                      },
                      "style": {
                        "common": {
                          "font": "caption",
                          "foreground": {
                            "color": "secondary"
                          }
                        }
                      }
                    }
                  ]
                },
                {
                  "id": "wh_results_header",
                  "type": "hstack",
                  "context": {
                    "_spacing": 8,
                    "_alignment": "center"
                  },
                  "style": {
                    "layout": {
                      "maxWidth": "infinity",
                      "padding": {
                        "horizontal": 2
                      }
                    }
                  },
                  "children": [
                    {
                      "id": "wh_results_icon",
                      "type": "image",
                      "context": {
                        "_source": "sf://books.vertical.fill"
                      },
                      "style": {
                        "layout": {
                          "width": 18,
                          "height": 18
                        },
                        "common": {
                          "foreground": "#E5B96A"
                        }
                      }
                    },
                    {
                      "id": "wh_results_text",
                      "type": "text",
                      "context": {
                        "_text": "{{ empty(${query}) ? (cast(count(${entries}), 'str') + ' whiskey topics') : 'Results for “' + ${query} + '”' }}"
                      },
                      "style": {
                        "common": {
                          "font": "headline",
                          "foreground": {
                            "color": "white"
                          }
                        }
                      }
                    }
                  ]
                },
                {
                  "id": "wh_results_cond",
                  "type": "conditional",
                  "context": {
                    "_condition": "{{ empty(${entries[name ~ ${query}]}) && empty(${entries[region ~ ${query}]}) && notEmpty(${query}) }}",
                    "_trueComponent": {
                      "id": "wh_empty_state",
                      "type": "vstack",
                      "context": {
                        "_spacing": 12,
                        "_alignment": "center"
                      },
                      "style": {
                        "layout": {
                          "maxWidth": "infinity",
                          "padding": 22
                        },
                        "common": {
                          "background": {
                            "light": "#FFF8F1",
                            "dark": "#211814"
                          },
                          "cornerRadius": 20
                        }
                      },
                      "children": [
                        {
                          "id": "wh_empty_icon",
                          "type": "image",
                          "context": {
                            "_source": "sf://magnifyingglass.circle"
                          },
                          "style": {
                            "layout": {
                              "width": 42,
                              "height": 42
                            },
                            "common": {
                              "foreground": "#D39B45"
                            }
                          }
                        },
                        {
                          "id": "wh_empty_title",
                          "type": "text",
                          "context": {
                            "_text": "No handbook entry found"
                          },
                          "style": {
                            "common": {
                              "font": "headline",
                              "foreground": {
                                "light": "#2B1D15",
                                "dark": "#F7E8DB"
                              }
                            }
                          }
                        },
                        {
                          "id": "wh_empty_copy",
                          "type": "text",
                          "context": {
                            "_text": "Search within whiskey names or regions, for example: Scotch, Ireland, Japan, rye."
                          },
                          "style": {
                            "common": {
                              "font": "subheadline",
                              "foreground": {
                                "color": "secondary"
                              }
                            }
                          },
                          "text": {
                            "multilineTextAlignment": "center"
                          }
                        }
                      ]
                    },
                    "_falseComponent": {
                      "id": "wh_results_scroll_stack",
                      "type": "vstack",
                      "context": {
                        "_spacing": 10,
                        "_alignment": "leading"
                      },
                      "style": {
                        "layout": {
                          "maxWidth": "infinity"
                        }
                      },
                      "children": [
                        {
                          "id": "wh_rows_dynamic",
                          "type": "dynamic",
                          "context": {
                            "_data": "{{ empty(${query}) ? ${entries} : (${entries[name ~ ${query}]} + ${entries[region ~ ${query}]}) }}"
                          },
                          "prototype": {
                            "id": "wh_row_link",
                            "type": "link",
                            "context": {
                              "name": "@{item.name}",
                              "page": "@{item.page}",
                              "region": "@{item.region}",
                              "kind": "@{item.kind}"
                            },
                            "destination": {
                              "id": "wh_detail_module",
                              "type": "module",
                              "version": "1.0",
                              "state": {
                                "summary": "",
                                "imageUrl": "",
                                "imageCaption": "",
                                "error": "",
                                "isLoading": true
                              },
                              "children": [
                                {
                                  "id": "wh_detail_root_scroll",
                                  "type": "scroll",
                                  "style": {
                                    "layout": {
                                      "maxWidth": "infinity",
                                      "maxHeight": "infinity"
                                    },
                                    "common": {
                                      "background": {
                                        "gradient": {
                                          "linear": {
                                            "colors": [
                                              "#17110D",
                                              "#241913",
                                              "#3A271C"
                                            ],
                                            "startPoint": "top",
                                            "endPoint": "bottom"
                                          }
                                        }
                                      }
                                    },
                                    "navigation": {
                                      "navigationTitle": "@{name}",
                                      "navigationBarTitleDisplayMode": "inline"
                                    }
                                  },
                                  "children": [
                                    {
                                      "id": "wh_detail_stack",
                                      "type": "vstack",
                                      "context": {
                                        "_spacing": 18,
                                        "_alignment": "leading"
                                      },
                                      "style": {
                                        "layout": {
                                          "padding": {
                                            "top": 14,
                                            "bottom": 28,
                                            "leading": 16,
                                            "trailing": 16
                                          },
                                          "maxWidth": "infinity"
                                        }
                                      },
                                      "children": [
                                        {
                                          "id": "wh_detail_hero",
                                          "type": "vstack",
                                          "context": {
                                            "_spacing": 12,
                                            "_alignment": "leading"
                                          },
                                          "style": {
                                            "layout": {
                                              "maxWidth": "infinity",
                                              "padding": 18
                                            },
                                            "common": {
                                              "background": {
                                                "gradient": {
                                                  "linear": {
                                                    "colors": [
                                                      "#A86A2A",
                                                      "#7A4520",
                                                      "#4E2B1B"
                                                    ],
                                                    "startPoint": "topLeading",
                                                    "endPoint": "bottomTrailing"
                                                  }
                                                }
                                              },
                                              "foreground": {
                                                "color": "white"
                                              },
                                              "cornerRadius": 24,
                                              "glass": "regular"
                                            },
                                            "shadow": {
                                              "color": {
                                                "color": "black",
                                                "opacity": 0.22
                                              },
                                              "radius": 12,
                                              "y": 6
                                            }
                                          },
                                          "children": [
                                            {
                                              "id": "wh_detail_region_chip",
                                              "type": "label",
                                              "context": {
                                                "_title": "@{region}",
                                                "_image": "sf://globe.europe.africa.fill"
                                              },
                                              "style": {
                                                "layout": {
                                                  "padding": {
                                                    "top": 6,
                                                    "bottom": 6,
                                                    "leading": 10,
                                                    "trailing": 10
                                                  }
                                                },
                                                "common": {
                                                  "background": {
                                                    "color": {
                                                      "color": "white",
                                                      "opacity": 0.18
                                                    }
                                                  },
                                                  "foreground": {
                                                    "color": "white"
                                                  },
                                                  "cornerRadius": 999,
                                                  "font": "caption"
                                                }
                                              }
                                            },
                                            {
                                              "id": "wh_detail_kind",
                                              "type": "text",
                                              "context": {
                                                "_text": "@{kind}"
                                              },
                                              "style": {
                                                "common": {
                                                  "font": "title3",
                                                  "foreground": {
                                                    "color": "white"
                                                  }
                                                }
                                              }
                                            },
                                            {
                                              "id": "wh_detail_note",
                                              "type": "text",
                                              "context": {
                                                "_text": "Summary and image are loaded from Wikipedia when available."
                                              },
                                              "style": {
                                                "common": {
                                                  "font": "caption",
                                                  "foreground": {
                                                    "color": {
                                                      "color": "white",
                                                      "opacity": 0.76
                                                    }
                                                  }
                                                }
                                              }
                                            }
                                          ]
                                        },
                                        {
                                          "id": "wh_detail_loading_cond",
                                          "type": "conditional",
                                          "context": {
                                            "_condition": "${isLoading}",
                                            "_trueComponent": {
                                              "id": "wh_detail_loading_card",
                                              "type": "vstack",
                                              "context": {
                                                "_spacing": 12,
                                                "_alignment": "center"
                                              },
                                              "style": {
                                                "layout": {
                                                  "maxWidth": "infinity",
                                                  "padding": 22
                                                },
                                                "common": {
                                                  "background": {
                                                    "light": "#FFF8F1",
                                                    "dark": "#211814"
                                                  },
                                                  "cornerRadius": 20
                                                }
                                              },
                                              "children": [
                                                {
                                                  "id": "wh_detail_progress",
                                                  "type": "progress",
                                                  "context": {
                                                    "_value": 0,
                                                    "_total": 1
                                                  }
                                                },
                                                {
                                                  "id": "wh_detail_loading_text",
                                                  "type": "text",
                                                  "context": {
                                                    "_text": "Loading description…"
                                                  },
                                                  "style": {
                                                    "common": {
                                                      "font": "subheadline",
                                                      "foreground": {
                                                        "color": "secondary"
                                                      }
                                                    }
                                                  }
                                                }
                                              ]
                                            },
                                            "_falseComponent": {
                                              "id": "wh_detail_body_stack",
                                              "type": "vstack",
                                              "context": {
                                                "_spacing": 16,
                                                "_alignment": "leading"
                                              },
                                              "style": {
                                                "layout": {
                                                  "maxWidth": "infinity"
                                                }
                                              },
                                              "children": [
                                                {
                                                  "id": "wh_detail_error_cond",
                                                  "type": "conditional",
                                                  "context": {
                                                    "_condition": "{{ notEmpty(${error}) }}",
                                                    "_trueComponent": {
                                                      "id": "wh_detail_error_card",
                                                      "type": "vstack",
                                                      "context": {
                                                        "_spacing": 10,
                                                        "_alignment": "leading"
                                                      },
                                                      "style": {
                                                        "layout": {
                                                          "maxWidth": "infinity",
                                                          "padding": 18
                                                        },
                                                        "common": {
                                                          "background": {
                                                            "light": "#FFF3F1",
                                                            "dark": "#311816"
                                                          },
                                                          "cornerRadius": 18
                                                        }
                                                      },
                                                      "children": [
                                                        {
                                                          "id": "wh_detail_error_label",
                                                          "type": "label",
                                                          "context": {
                                                            "_title": "Description unavailable",
                                                            "_image": "sf://exclamationmark.triangle.fill"
                                                          },
                                                          "style": {
                                                            "common": {
                                                              "font": "headline",
                                                              "foreground": {
                                                                "color": "red"
                                                              }
                                                            }
                                                          }
                                                        },
                                                        {
                                                          "id": "wh_detail_error_text",
                                                          "type": "text",
                                                          "context": {
                                                            "_text": "${error}"
                                                          },
                                                          "style": {
                                                            "common": {
                                                              "font": "subheadline",
                                                              "foreground": {
                                                                "light": "#4A1E1A",
                                                                "dark": "#FFD9D4"
                                                              }
                                                            }
                                                          }
                                                        }
                                                      ]
                                                    },
                                                    "_falseComponent": {
                                                      "id": "wh_detail_content_stack",
                                                      "type": "vstack",
                                                      "context": {
                                                        "_spacing": 16,
                                                        "_alignment": "leading"
                                                      },
                                                      "style": {
                                                        "layout": {
                                                          "maxWidth": "infinity"
                                                        }
                                                      },
                                                      "children": [
                                                        {
                                                          "id": "wh_detail_image_cond",
                                                          "type": "conditional",
                                                          "context": {
                                                            "_condition": "{{ notEmpty(${imageUrl}) }}",
                                                            "_trueComponent": {
                                                              "id": "wh_detail_image_card",
                                                              "type": "vstack",
                                                              "context": {
                                                                "_spacing": 10,
                                                                "_alignment": "leading"
                                                              },
                                                              "style": {
                                                                "layout": {
                                                                  "maxWidth": "infinity",
                                                                  "padding": 12
                                                                },
                                                                "common": {
                                                                  "background": {
                                                                    "light": "#FFF8F1",
                                                                    "dark": "#211814"
                                                                  },
                                                                  "cornerRadius": 20
                                                                },
                                                                "shadow": {
                                                                  "color": {
                                                                    "color": "black",
                                                                    "opacity": 0.12
                                                                  },
                                                                  "radius": 8,
                                                                  "y": 4
                                                                }
                                                              },
                                                              "children": [
                                                                {
                                                                  "id": "wh_detail_image",
                                                                  "type": "image",
                                                                  "context": {
                                                                    "_source": "${imageUrl}",
                                                                    "_contentMode": "fill",
                                                                    "_placeholder": "sf://photo"
                                                                  },
                                                                  "style": {
                                                                    "layout": {
                                                                      "maxWidth": "infinity",
                                                                      "height": 220
                                                                    },
                                                                    "common": {
                                                                      "cornerRadius": 16
                                                                    }
                                                                  }
                                                                },
                                                                {
                                                                  "id": "wh_detail_image_caption_cond",
                                                                  "type": "conditional",
                                                                  "context": {
                                                                    "_condition": "{{ notEmpty(${imageCaption}) }}",
                                                                    "_trueComponent": {
                                                                      "id": "wh_detail_image_caption",
                                                                      "type": "text",
                                                                      "context": {
                                                                        "_text": "${imageCaption}"
                                                                      },
                                                                      "style": {
                                                                        "common": {
                                                                          "font": "caption",
                                                                          "foreground": {
                                                                            "color": "secondary"
                                                                          }
                                                                        }
                                                                      }
                                                                    },
                                                                    "_falseComponent": {
                                                                      "id": "wh_detail_image_caption_empty",
                                                                      "type": "empty"
                                                                    }
                                                                  }
                                                                }
                                                              ]
                                                            },
                                                            "_falseComponent": {
                                                              "id": "wh_detail_no_image_card",
                                                              "type": "vstack",
                                                              "context": {
                                                                "_spacing": 10,
                                                                "_alignment": "center"
                                                              },
                                                              "style": {
                                                                "layout": {
                                                                  "maxWidth": "infinity",
                                                                  "padding": 20
                                                                },
                                                                "common": {
                                                                  "background": {
                                                                    "light": "#FFF8F1",
                                                                    "dark": "#211814"
                                                                  },
                                                                  "cornerRadius": 20
                                                                }
                                                              },
                                                              "children": [
                                                                {
                                                                  "id": "wh_detail_no_image_icon",
                                                                  "type": "image",
                                                                  "context": {
                                                                    "_source": "sf://photo.on.rectangle"
                                                                  },
                                                                  "style": {
                                                                    "layout": {
                                                                      "width": 36,
                                                                      "height": 36
                                                                    },
                                                                    "common": {
                                                                      "foreground": "#D39B45"
                                                                    }
                                                                  }
                                                                },
                                                                {
                                                                  "id": "wh_detail_no_image_text",
                                                                  "type": "text",
                                                                  "context": {
                                                                    "_text": "No image was available for this handbook entry."
                                                                  },
                                                                  "style": {
                                                                    "common": {
                                                                      "font": "subheadline",
                                                                      "foreground": {
                                                                        "color": "secondary"
                                                                      }
                                                                    }
                                                                  },
                                                                  "text": {
                                                                    "multilineTextAlignment": "center"
                                                                  }
                                                                }
                                                              ]
                                                            }
                                                          }
                                                        },
                                                        {
                                                          "id": "wh_detail_summary_card",
                                                          "type": "vstack",
                                                          "context": {
                                                            "_spacing": 12,
                                                            "_alignment": "leading"
                                                          },
                                                          "style": {
                                                            "layout": {
                                                              "maxWidth": "infinity",
                                                              "padding": 18
                                                            },
                                                            "common": {
                                                              "background": {
                                                                "light": "#FFF8F1",
                                                                "dark": "#211814"
                                                              },
                                                              "cornerRadius": 20
                                                            },
                                                            "shadow": {
                                                              "color": {
                                                                "color": "black",
                                                                "opacity": 0.12
                                                              },
                                                              "radius": 8,
                                                              "y": 4
                                                            }
                                                          },
                                                          "children": [
                                                            {
                                                              "id": "wh_detail_summary_header",
                                                              "type": "label",
                                                              "context": {
                                                                "_title": "Short description",
                                                                "_image": "sf://text.book.closed.fill"
                                                              },
                                                              "style": {
                                                                "common": {
                                                                  "font": "headline",
                                                                  "foreground": {
                                                                    "light": "#2B1D15",
                                                                    "dark": "#F7E8DB"
                                                                  }
                                                                }
                                                              }
                                                            },
                                                            {
                                                              "id": "wh_detail_summary_text",
                                                              "type": "text",
                                                              "context": {
                                                                "_text": "{{ notEmpty(${summary}) ? ${summary} : 'No short description was returned for this page.' }}"
                                                              },
                                                              "style": {
                                                                "common": {
                                                                  "font": "body",
                                                                  "foreground": {
                                                                    "light": "#2B1D15",
                                                                    "dark": "#F7E8DB"
                                                                  }
                                                                }
                                                              },
                                                              "text": {
                                                                "lineSpacing": 3
                                                              }
                                                            }
                                                          ]
                                                        }
                                                      ]
                                                    }
                                                  }
                                                }
                                              ]
                                            }
                                          }
                                        }
                                      ]
                                    }
                                  ],
                                  "events": {
                                    "onAppear": [
                                      {
                                        "state": {
                                          "id": "wh_detail_prepare",
                                          "input": {
                                            "summary": "",
                                            "imageUrl": "",
                                            "imageCaption": "",
                                            "error": "",
                                            "isLoading": true
                                          },
                                          "output": {
                                            "success": [
                                              {
                                                "repo": {
                                                  "id": "wh_detail_fetch",
                                                  "input": {
                                                    "repositoryId": "wiki_api",
                                                    "operation": "read",
                                                    "params": {
                                                      "subUrl": "/@{page}"
                                                    }
                                                  },
                                                  "output": {
                                                    "success": [
                                                      {
                                                        "state": {
                                                          "id": "wh_detail_apply",
                                                          "input": {
                                                            "summary": "@{wh_detail_fetch.extract}",
                                                            "imageUrl": "{{ @{wh_detail_fetch.originalimage.source} ?? @{wh_detail_fetch.thumbnail.source} ?? '' }}",
                                                            "imageCaption": "{{ @{wh_detail_fetch.description} ?? '' }}",
                                                            "error": "",
                                                            "isLoading": false
                                                          }
                                                        }
                                                      }
                                                    ],
                                                    "failure": [
                                                      {
                                                        "state": {
                                                          "id": "wh_detail_fail",
                                                          "input": {
                                                            "summary": "",
                                                            "imageUrl": "",
                                                            "imageCaption": "",
                                                            "error": "{{ 'Request failed' + (notEmpty(@{wh_detail_fetch.message}) ? ': ' + @{wh_detail_fetch.message} : '. Check your network and try again.') }}",
                                                            "isLoading": false
                                                          }
                                                        }
                                                      }
                                                    ]
                                                  }
                                                }
                                              }
                                            ]
                                          }
                                        }
                                      }
                                    ]
                                  }
                                }
                              ]
                            },
                            "children": [
                              {
                                "id": "wh_row_card",
                                "type": "hstack",
                                "context": {
                                  "_spacing": 14,
                                  "_alignment": "center"
                                },
                                "style": {
                                  "layout": {
                                    "maxWidth": "infinity",
                                    "padding": 16
                                  },
                                  "common": {
                                    "background": {
                                      "light": "#FFF8F1",
                                      "dark": "#211814"
                                    },
                                    "cornerRadius": 20
                                  },
                                  "shadow": {
                                    "color": {
                                      "color": "black",
                                      "opacity": 0.12
                                    },
                                    "radius": 8,
                                    "y": 4
                                  }
                                },
                                "children": [
                                  {
                                    "id": "wh_row_icon_wrap",
                                    "type": "zstack",
                                    "style": {
                                      "layout": {
                                        "width": 52,
                                        "height": 52
                                      }
                                    },
                                    "children": [
                                      {
                                        "id": "wh_row_icon_bg",
                                        "type": "circle",
                                        "style": {
                                          "layout": {
                                            "width": 52,
                                            "height": 52
                                          },
                                          "shape": {
                                            "fill": {
                                              "gradient": {
                                                "linear": {
                                                  "colors": [
                                                    "#D7A04D",
                                                    "#9C5C27"
                                                  ],
                                                  "startPoint": "topLeading",
                                                  "endPoint": "bottomTrailing"
                                                }
                                              }
                                            }
                                          }
                                        }
                                      },
                                      {
                                        "id": "wh_row_icon",
                                        "type": "image",
                                        "context": {
                                          "_source": "sf://wineglass.fill"
                                        },
                                        "style": {
                                          "layout": {
                                            "width": 20,
                                            "height": 20
                                          },
                                          "common": {
                                            "foreground": {
                                              "color": "white"
                                            }
                                          }
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "id": "wh_row_texts",
                                    "type": "vstack",
                                    "context": {
                                      "_spacing": 4,
                                      "_alignment": "leading"
                                    },
                                    "style": {
                                      "layout": {
                                        "maxWidth": "infinity"
                                      }
                                    },
                                    "children": [
                                      {
                                        "id": "wh_row_name",
                                        "type": "text",
                                        "context": {
                                          "_text": "@{name}"
                                        },
                                        "style": {
                                          "common": {
                                            "font": {
                                              "kind": "headline",
                                              "weight": "semibold"
                                            },
                                            "foreground": {
                                              "light": "#2B1D15",
                                              "dark": "#F7E8DB"
                                            }
                                          }
                                        }
                                      },
                                      {
                                        "id": "wh_row_kind",
                                        "type": "text",
                                        "context": {
                                          "_text": "@{kind}"
                                        },
                                        "style": {
                                          "common": {
                                            "font": "subheadline",
                                            "foreground": {
                                              "color": "secondary"
                                            }
                                          }
                                        },
                                        "text": {
                                          "lineLimit": 2
                                        }
                                      },
                                      {
                                        "id": "wh_row_region",
                                        "type": "label",
                                        "context": {
                                          "_title": "@{region}",
                                          "_image": "sf://mappin.and.ellipse"
                                        },
                                        "style": {
                                          "common": {
                                            "font": "caption",
                                            "foreground": "#A86A2A"
                                          }
                                        }
                                      }
                                    ]
                                  },
                                  {
                                    "id": "wh_row_chevron",
                                    "type": "image",
                                    "context": {
                                      "_source": "sf://chevron.right"
                                    },
                                    "style": {
                                      "layout": {
                                        "width": 12,
                                        "height": 12
                                      },
                                      "common": {
                                        "foreground": {
                                          "color": "secondary"
                                        }
                                      }
                                    }
                                  }
                                ]
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}